mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +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) {
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user