From 2642f7443ffb36247501cc36bd529a884a709e58 Mon Sep 17 00:00:00 2001 From: rxi Date: Fri, 8 May 2020 13:55:23 +0100 Subject: [PATCH] Added default text to find-replace's "new text" input --- data/core/commands/findreplace.lua | 3 +++ 1 file changed, 3 insertions(+) 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)