Skip to content

Commit

Permalink
Fix tab order in FindReplace
Browse files Browse the repository at this point in the history
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 arduino#5380.
  • Loading branch information
matthijskooijman committed Sep 19, 2016
1 parent c1291ee commit c927237
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/cc/arduino/view/findreplace/FindReplace.java
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,12 @@ private boolean find(boolean wrap, boolean backwards, boolean searchTabs, int or
}

if (backwards) {
editor.selectNextTab();
editor.selectPrevTab();
this.setVisible(true);
int l = editor.getCurrentTab().getText().length() - 1;
editor.getCurrentTab().setSelection(l, l);
} else {
editor.selectPrevTab();
editor.selectNextTab();
this.setVisible(true);
editor.getCurrentTab().setSelection(0, 0);
}
Expand Down

0 comments on commit c927237

Please sign in to comment.