mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-02 23:00:04 +08:00
feat(flygrep): add toggle_expr_mode function
This commit is contained in:
parent
231d92b229
commit
ce8608ef96
@ -357,6 +357,18 @@ local function double_click()
|
||||
open_item()
|
||||
end
|
||||
|
||||
local function toggle_expr_mode()
|
||||
if grep_mode == 'expr' then
|
||||
grep_mode = 'string'
|
||||
else
|
||||
grep_mode = 'expr'
|
||||
end
|
||||
mpt._oninputpro()
|
||||
mpt._handle_fly(mpt._prompt.cursor_begin
|
||||
.. mpt._prompt.cursor_char
|
||||
.. mpt._prompt.cursor_end)
|
||||
end
|
||||
|
||||
mpt._function_key = {
|
||||
[Key.t('<Tab>')] = next_item,
|
||||
[Key.t('<C-j>')] = next_item,
|
||||
|
Loading…
Reference in New Issue
Block a user