Skip to content

Commit 3d73bf5

Browse files
committed
fix: fzf_live|actions append to fzf events
1 parent c7780cb commit 3d73bf5

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

lua/fzf-lua/core.lua

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,19 +1087,11 @@ M.convert_reload_actions = function(reload_cmd, opts)
10871087
}
10881088
end
10891089
end
1090-
opts.keymap.fzf.load = (function()
1091-
-- NOTE: this fixes existence of both load as function and rebind, e.g. git_status with:
1092-
-- setup({ keymap = { fzf = { true, load = function() _G._fzf_load_called = true end } } }
1093-
if type(opts.keymap.fzf.load) == "function" then
1094-
opts.keymap.fzf.load = "execute-silent:"
1095-
.. shell.stringify_data(opts.keymap.fzf.load, opts, nil, true)
1096-
end
1097-
if rebind and type(opts.keymap.fzf.load) == "string" then
1098-
return string.format("%s+%s", rebind, opts.keymap.fzf.load)
1099-
else
1100-
return rebind or opts.keymap.fzf.load
1101-
end
1102-
end)()
1090+
1091+
if rebind then
1092+
opts._fzf_cli_args = (opts._fzf_cli_args or "") .. string.format(" --bind=%s",
1093+
libuv.shellescape(string.format("load:+%s", rebind)))
1094+
end
11031095
return opts
11041096
end
11051097

@@ -1228,10 +1220,10 @@ M.setup_fzf_interactive_flags = function(command, fzf_field_index, opts)
12281220
reload_command = reload_command .. " || " .. utils.shell_nop()
12291221
end
12301222
opts._fzf_cli_args = string.format("--bind=%s", libuv.shellescape(
1231-
string.format("change:reload:%s%s", no_query_condi, reload_command)))
1223+
string.format("change:+reload:%s%s", no_query_condi, reload_command)))
12321224
if utils.has(opts, "fzf", { 0, 35 }) then
12331225
opts._fzf_cli_args = opts._fzf_cli_args .. string.format(" --bind=%s",
1234-
libuv.shellescape(string.format("start:reload:%s%s", no_query_condi, reload_command)))
1226+
libuv.shellescape(string.format("start:+reload:%s%s", no_query_condi, reload_command)))
12351227
end
12361228
end
12371229

0 commit comments

Comments
 (0)