diff options
author | 2014-10-30 11:48:50 -0400 | |
---|---|---|
committer | 2014-10-30 11:48:50 -0400 | |
commit | 12370fa4e7816a2065f475c3a2dd1912f91d0144 (patch) | |
tree | 262591a890d14a0b99ff2c17ae6e0c7288352d49 | |
parent | f46dc87b36c20f02134afb2297a9e093065f7af8 (diff) | |
download | textadept-12370fa4e7816a2065f475c3a2dd1912f91d0144.tar.gz textadept-12370fa4e7816a2065f475c3a2dd1912f91d0144.zip |
Ensure "find in files" is off when activating normal find.
-rw-r--r-- | modules/textadept/keys.lua | 8 | ||||
-rw-r--r-- | modules/textadept/menu.lua | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/textadept/keys.lua b/modules/textadept/keys.lua index 3e463026..a8ae30d9 100644 --- a/modules/textadept/keys.lua +++ b/modules/textadept/keys.lua @@ -234,8 +234,8 @@ M.utils = { while buffer.char_at[pos - 1] ~= 60 do pos = pos - 1 end -- '<' buffer:insert_text(-1, '</'..buffer:text_range(pos, buffer.current_pos)) end, - find_in_files = function() - ui.find.in_files = true + find = function(in_files) + ui.find.in_files = in_files ui.find.focus() end, select_command = function() textadept.menu.select_command() end, @@ -444,7 +444,7 @@ keys.csup = buffer.move_selected_lines_up keys.csdown = buffer.move_selected_lines_down -- Search. -keys[not OSX and not CURSES and 'cf' or 'mf'] = ui.find.focus +keys[not OSX and not CURSES and 'cf' or 'mf'] = utils.find if CURSES then keys.mF = keys.mf end -- in case mf is used by GUI terminals keys[not OSX and not CURSES and 'cg' or 'mg'] = ui.find.find_next if not OSX and not CURSES then keys.f3 = keys.cg end @@ -457,7 +457,7 @@ keys[not OSX and (not CURSES and 'caR' or 'mR') or 'cR'] = ui.find.replace_all -- Replace is ar when find pane is focused in GUI. -- Replace All is aa when find pane is focused in GUI. keys[not OSX and not CURSES and 'caf' or 'cmf'] = ui.find.find_incremental -if not CURSES then keys[not OSX and 'cF' or 'mF'] = utils.find_in_files end +if not CURSES then keys[not OSX and 'cF' or 'mF'] = {utils.find, true} end -- Find in Files is ai when find pane is focused in GUI. if not CURSES then keys[not OSX and 'cag' or 'cmg'] = {ui.find.goto_file_found, false, true} diff --git a/modules/textadept/menu.lua b/modules/textadept/menu.lua index e427e072..500136ce 100644 --- a/modules/textadept/menu.lua +++ b/modules/textadept/menu.lua @@ -89,14 +89,14 @@ local menubar = { }, }, { title = _L['_Search'], - {_L['_Find'], ui.find.focus}, + {_L['_Find'], utils.find}, {_L['Find _Next'], ui.find.find_next}, {_L['Find _Previous'], ui.find.find_prev}, {_L['_Replace'], ui.find.replace}, {_L['Replace _All'], ui.find.replace_all}, {_L['Find _Incremental'], ui.find.find_incremental}, SEPARATOR, - {_L['Find in Fi_les'], utils.find_in_files}, + {_L['Find in Fi_les'], {utils.find, true}}, {_L['Goto Nex_t File Found'], {ui.find.goto_file_found, false, true}}, {_L['Goto Previou_s File Found'], {ui.find.goto_file_found, false, false}}, SEPARATOR, |