fix(lazy): 按键触发加载失败时不执行后续 action
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
51302fe9f2
commit
beb75d3a17
@ -109,7 +109,9 @@ M.on_keys = function(name, keys, mode, fn, action, opts)
|
||||
mode = mode or "n"
|
||||
opts = opts or {}
|
||||
vim.keymap.set(mode, keys, function()
|
||||
M.load(name, fn)
|
||||
if not M.load(name, fn) then
|
||||
return
|
||||
end
|
||||
if action then
|
||||
action()
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user