File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -1422,7 +1422,7 @@ public void actionPerformed(ActionEvent e) {
1422
1422
if (find == null ) {
1423
1423
find = new FindReplace (Editor .this );
1424
1424
}
1425
- if (!OSUtils .isMacOS () && getSelectedText () != null ) {
1425
+ if (!OSUtils .isMacOS ()) {
1426
1426
find .setFindText (getSelectedText ());
1427
1427
}
1428
1428
find .setLocationRelativeTo (Editor .this );
@@ -1458,11 +1458,8 @@ public void actionPerformed(ActionEvent e) {
1458
1458
if (find == null ) {
1459
1459
find = new FindReplace (Editor .this );
1460
1460
}
1461
- if (getSelectedText () != null ) {
1462
- find .setFindText (getSelectedText ());
1463
- }
1464
- find .setLocationRelativeTo (Editor .this );
1465
- find .setVisible (true );
1461
+ find .setFindText (getSelectedText ());
1462
+ find .findNext ();
1466
1463
}
1467
1464
});
1468
1465
menu .add (item );
Original file line number Diff line number Diff line change @@ -439,9 +439,12 @@ public void replaceAll() {
439
439
}
440
440
}
441
441
442
- public void setFindText (String t ) {
443
- findField .setText (t );
444
- findString = t ;
442
+ public void setFindText (String text ) {
443
+ if (text == null ) {
444
+ return ;
445
+ }
446
+ findField .setText (text );
447
+ findString = text ;
445
448
}
446
449
447
450
public void findNext () {
You can’t perform that action at this time.
0 commit comments