Skip to content

Commit 88b1d36

Browse files
committed
Find/replace overlay: store search in history when leaving overlay eclipse-platform#2291
The find/replace overlay only stores a search input in the history when an explicit search operation (forward/backward/all search) is performed. In case only an incremental search (via search-as-you-type) is performed, this input will not be added to the history. In some cases, no explicit search is executed but the final result of a search-as-you-type input is sufficient for the user. Since this final result, after they finished typing, also represented a relevant search input, it should be added to the history. This change addresses the issue by adding a search input to the history also when the overlay is left, i.e., the focus is moved to somewhere else, such as the target editor or some other view. Fixes eclipse-platform#2291
1 parent fe9d7e2 commit 88b1d36

File tree

1 file changed

+1
-0
lines changed
  • bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay

1 file changed

+1
-0
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ public void shellActivated(ShellEvent e) {
227227
@Override
228228
public void shellDeactivated(ShellEvent e) {
229229
removeSearchScope();
230+
searchBar.storeHistory();
230231
}
231232
};
232233

0 commit comments

Comments
 (0)