diff --git a/data/core/commands/findreplace.lua b/data/core/commands/findreplace.lua index 7853bd11..1fc48cf0 100644 --- a/data/core/commands/findreplace.lua +++ b/data/core/commands/findreplace.lua @@ -73,6 +73,9 @@ local function replace(kind, default, fn) core.command_view.doc:set_selection(math.huge, math.huge, 1, 1) core.command_view:enter("Find To Replace " .. kind, function(old) + core.command_view:set_text(old) + core.command_view.doc:set_selection(math.huge, math.huge, 1, 1) + local s = string.format("Replace %s %q With", kind, old) core.command_view:enter(s, function(new) local n = doc():replace(function(text)