diff options
author | 2020-08-16 12:29:50 -0400 | |
---|---|---|
committer | 2020-08-16 12:29:50 -0400 | |
commit | f7855153d938c99d506ad363e889031e1e9420a3 (patch) | |
tree | 14f9862f6e66da21b43747c8351301de8768c2c1 /modules | |
parent | 67ff8634b57968e5734fe4e3b0f63248caa6917f (diff) | |
download | textadept-f7855153d938c99d506ad363e889031e1e9420a3.tar.gz textadept-f7855153d938c99d506ad363e889031e1e9420a3.zip |
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.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/find.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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, ',') |