diff --git a/lib/ace/commands/default_commands.js b/lib/ace/commands/default_commands.js index 7fbe610f..def3bc11 100644 --- a/lib/ace/commands/default_commands.js +++ b/lib/ace/commands/default_commands.js @@ -95,7 +95,7 @@ canon.addCommand({ name: "find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(env, args, request) { - var needle = prompt("Find:"); + var needle = prompt("Find:", env.editor.getCopyText()); env.editor.find(needle); } }); @@ -103,7 +103,7 @@ canon.addCommand({ name: "replace", bindKey: bindKey("Ctrl-R", "Command-Option-F"), exec: function(env, args, request) { - var needle = prompt("Find:"); + var needle = prompt("Find:", env.editor.getCopyText()); if (!needle) return; var replacement = prompt("Replacement:");