From f7855153d938c99d506ad363e889031e1e9420a3 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 16 Aug 2020 12:29:50 -0400 Subject: Fixed a bug where filter text could always be put in the "Replace" entry. This happened when you activated "Find in Files" twice in a row. --- modules/textadept/find.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 979a08d6..34174ff7 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -122,12 +122,13 @@ local orig_focus = M.focus -- @param options Optional table of options to initially set. -- @name focus function M.focus(options) + local already_in_files = M.in_files if assert_type(options, 'table/nil', 1) then for k, v in pairs(options) do M[k] = v end end M.replace_label_text = not M.in_files and _L['Replace:'] or _L['Filter:'] if M.in_files then - repl_text = M.replace_entry_text -- save + if not already_in_files then repl_text = M.replace_entry_text end -- save local filter = M.find_in_files_filters[ff_dir()] or lfs.default_filter M.replace_entry_text = type(filter) == 'string' and filter or table.concat(filter, ',') -- cgit v1.2.3