add selected text to finds prompt
This commit is contained in:
parent
2ca2cc5220
commit
fcd7919fdc
1 changed files with 2 additions and 2 deletions
|
|
@ -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:");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue