Added default text to find-replace's "new text" input

This commit is contained in:
rxi 2020-05-08 13:55:23 +01:00
parent b2756d8a49
commit 2642f7443f

View file

@ -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)