diff --git a/src/main/studio/ui/SearchPanel.java b/src/main/studio/ui/SearchPanel.java index 3b9cb378..f89fc1cd 100644 --- a/src/main/studio/ui/SearchPanel.java +++ b/src/main/studio/ui/SearchPanel.java @@ -140,7 +140,7 @@ private void doSearch(SearchContext context, SearchAction action) { } } - int pos = textArea.getCaretPosition(); + int pos = context.getSearchForward() ? textArea.getSelectionEnd() : textArea.getSelectionStart(); textArea.setSelectionStart(pos); textArea.setSelectionEnd(pos); SearchResult result;