Skip to content

Commit c927237

Browse files
Fix tab order in FindReplace
When searching through all tabs, the order was accidentally reversed. This was broken by commit d2bac86 (Remove tab switching logic from Sketch). This also fixes a problem where "replace all" would only work on the first and last tab (since it would search backwards from the first tab to the last tab and then conclude it was done). This fixes a part of #5380.
1 parent c1291ee commit c927237

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/cc/arduino/view/findreplace/FindReplace.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,12 @@ private boolean find(boolean wrap, boolean backwards, boolean searchTabs, int or
345345
}
346346

347347
if (backwards) {
348-
editor.selectNextTab();
348+
editor.selectPrevTab();
349349
this.setVisible(true);
350350
int l = editor.getCurrentTab().getText().length() - 1;
351351
editor.getCurrentTab().setSelection(l, l);
352352
} else {
353-
editor.selectPrevTab();
353+
editor.selectNextTab();
354354
this.setVisible(true);
355355
editor.getCurrentTab().setSelection(0, 0);
356356
}

0 commit comments

Comments
 (0)