mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-10 22:17:13 -06:00
Theme Editor: fixed endless look in "replace all" when replacing e.g. "a" with "aa"
This commit is contained in:
@@ -192,9 +192,17 @@ class FlatFindReplaceBar
|
||||
context.setSearchFor( findField.getText() );
|
||||
context.setReplaceWith( replaceField.getText() );
|
||||
|
||||
// make sure that search wrap is disabled because otherwise it is easy
|
||||
// to have endeless loop when replacing e.g. "a" with "aa"
|
||||
boolean oldSearchWrap = context.getSearchWrap();
|
||||
context.setSearchWrap( false );
|
||||
|
||||
// replace all
|
||||
SearchResult result = SearchEngine.replaceAll( textArea, context );
|
||||
|
||||
// restore search wrap
|
||||
context.setSearchWrap( oldSearchWrap );
|
||||
|
||||
// update matches info labels
|
||||
updateMatchesLabel( result, true );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user