mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
Call ensureOffsetNotInClosedFold only when a match is found
This commit is contained in:
parent
c927237912
commit
9723726387
@ -323,8 +323,6 @@ public class FindReplace extends javax.swing.JFrame {
|
||||
}
|
||||
}
|
||||
|
||||
editor.getCurrentTab().getTextArea().getFoldManager().ensureOffsetNotInClosedFold(nextIndex);
|
||||
|
||||
if (nextIndex == -1) {
|
||||
// Nothing found on this tab: Search other tabs if required
|
||||
if (searchTabs) {
|
||||
@ -366,6 +364,7 @@ public class FindReplace extends javax.swing.JFrame {
|
||||
}
|
||||
|
||||
if (nextIndex != -1) {
|
||||
editor.getCurrentTab().getTextArea().getFoldManager().ensureOffsetNotInClosedFold(nextIndex);
|
||||
editor.getCurrentTab().setSelection(nextIndex, nextIndex + search.length());
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user