File tree Expand file tree Collapse file tree 2 files changed +185
-114
lines changed Expand file tree Collapse file tree 2 files changed +185
-114
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,11 @@ protected JMenu buildEditMenu() {
11201120 undoItem .addActionListener (undoAction = new UndoAction ());
11211121 menu .add (undoItem );
11221122
1123- redoItem = newJMenuItem (_ ("Redo" ), 'Y' );
1123+ if (!Base .isMacOS ()) {
1124+ redoItem = newJMenuItem (_ ("Redo" ), 'Y' );
1125+ } else {
1126+ redoItem = newJMenuItemShift (_ ("Redo" ), 'Z' );
1127+ }
11241128 redoItem .addActionListener (redoAction = new RedoAction ());
11251129 menu .add (redoItem );
11261130
@@ -1232,10 +1236,29 @@ public void actionPerformed(ActionEvent e) {
12321236 item .addActionListener (new ActionListener () {
12331237 public void actionPerformed (ActionEvent e ) {
12341238 if (find != null ) {
1235- //find.find(true);
1236- //FindReplace find = new FindReplace(Editor.this); //.show();
1237- find .find (true );
1239+ find .findNext ();
1240+ }
1241+ }
1242+ });
1243+ menu .add (item );
1244+
1245+ item = newJMenuItemShift (_ ("Find Previous" ), 'G' );
1246+ item .addActionListener (new ActionListener () {
1247+ public void actionPerformed (ActionEvent e ) {
1248+ if (find != null ) {
1249+ find .findPrevious ();
1250+ }
1251+ }
1252+ });
1253+ menu .add (item );
1254+
1255+ item = newJMenuItem (_ ("Use Selection For Find" ), 'E' );
1256+ item .addActionListener (new ActionListener () {
1257+ public void actionPerformed (ActionEvent e ) {
1258+ if (find == null ) {
1259+ find = new FindReplace (Editor .this );
12381260 }
1261+ find .setFindText ( getSelectedText () );
12391262 }
12401263 });
12411264 menu .add (item );
You can’t perform that action at this time.
0 commit comments