mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
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.
This commit is contained in:
parent
c1291eedde
commit
c927237912
@ -345,12 +345,12 @@ public class FindReplace extends javax.swing.JFrame {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (backwards) {
|
if (backwards) {
|
||||||
editor.selectNextTab();
|
editor.selectPrevTab();
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
int l = editor.getCurrentTab().getText().length() - 1;
|
int l = editor.getCurrentTab().getText().length() - 1;
|
||||||
editor.getCurrentTab().setSelection(l, l);
|
editor.getCurrentTab().setSelection(l, l);
|
||||||
} else {
|
} else {
|
||||||
editor.selectPrevTab();
|
editor.selectNextTab();
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
editor.getCurrentTab().setSelection(0, 0);
|
editor.getCurrentTab().setSelection(0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user