File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 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) {
14221422 if (find == null ) {
14231423 find = new FindReplace (Editor .this );
14241424 }
1425- if (!OSUtils .isMacOS () && getSelectedText () != null ) {
1425+ if (!OSUtils .isMacOS ()) {
14261426 find .setFindText (getSelectedText ());
14271427 }
14281428 find .setLocationRelativeTo (Editor .this );
@@ -1458,11 +1458,8 @@ public void actionPerformed(ActionEvent e) {
14581458 if (find == null ) {
14591459 find = new FindReplace (Editor .this );
14601460 }
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 ();
14661463 }
14671464 });
14681465 menu .add (item );
Original file line number Diff line number Diff line change @@ -439,9 +439,12 @@ public void replaceAll() {
439439 }
440440 }
441441
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 ;
445448 }
446449
447450 public void findNext () {
You can’t perform that action at this time.
0 commit comments