This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 238515

Summary: Find / Replace does not deselect previous selection
Product: editor Reporter: rasamassen
Component: SearchAssignee: Milutin Kristofic <mkristofic>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot

Description rasamassen 2013-11-18 16:41:18 UTC
Created attachment 142322 [details]
Screenshot

When running Replace (ctrl+h), the editor will not release the original selection and search the new selection without first closing Replace and reopening it.

Steps to reproduce:
Select/Highlight a portion of text
Run Replace (ctrl+h)
Find any text and Replace it with any text
Select/Highlight another portion of text (do not close Replace)
Find any text and Replace it with any text

Expected Results:
Text in the new selection is replaced

Actual Results:
Even with new selection highlighted, the original selection continues to have an light-blue background; if you click replace or replace all, it searches the original selection and not the new selection; if you change the text in Find, it searches and highlights text in the original selection and not the new selection

Screenshot attached. Notice "Greenfield" is in red under Find, even though "Greenfield" clearly appears multiple times in the new selection (the lower, darker blue selection)
Comment 1 Milutin Kristofic 2013-11-19 14:27:56 UTC
Text selection is not enough for search selection. You need to press ctrl+h to reselect new search selection. I can solve it only with better ui, there is a plan to make selection button for search and replace.

*** This bug has been marked as a duplicate of bug 219536 ***