Skip to content

Commit 31dfbe0

Browse files
phanenibhagwan
authored andcommitted
fix(fzf_live): shell nop since we use start event
1 parent cdfac04 commit 31dfbe0

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

lua/fzf-lua/core.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ M.fzf_live = function(contents, opts)
203203
if type(contents) == "function" and M.can_transform(opts) then
204204
local cmd = shell.stringify_data(contents, opts, fzf_field_index)
205205
M.setup_fzf_live_flags(cmd, fzf_field_index, opts)
206-
return M.fzf_wrap(nil, opts, true)
206+
return M.fzf_wrap(utils.shell_nop(), opts, true)
207207
end
208208
local cmd0 = contents ---@type string
209209
local func_contents = type(contents) == "function"
@@ -218,7 +218,7 @@ M.fzf_live = function(contents, opts)
218218
shell.stringify(func_contents, opts, fzf_field_index)
219219
cmd = mt and M.expand_query(cmd, fzf_field_index) or cmd
220220
M.setup_fzf_live_flags(cmd, fzf_field_index, opts)
221-
return M.fzf_wrap(nil, opts, true)
221+
return M.fzf_wrap(utils.shell_nop(), opts, true)
222222
end
223223

224224
M.fzf_resume = function(opts)

lua/fzf-lua/providers/grep.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ M.live_grep = function(opts)
308308
local query = s[1] or ""
309309
opts.no_esc = nil
310310
local cmd0 = get_grep_cmd(opts, query, true)
311-
return core.can_transform(opts) and ("reload:" .. cmd0) or cmd0
311+
return core.can_transform(opts) and
312+
("reload:" .. (
313+
not opts.exec_empty_query and #query == 0 and FzfLua.utils.shell_nop() or cmd0))
314+
or cmd0
312315
end, opts)
313316
end
314317

0 commit comments

Comments
 (0)