Skip to content

Commit 19f43cc

Browse files
committed
fix local cmd load
1 parent 83dfb1d commit 19f43cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lua/strive/init.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,6 @@ function Plugin:cmd(commands)
860860
api.nvim_create_user_command(name, function(opts)
861861
-- Remove this command to avoid recursion
862862
pcall(api.nvim_del_user_command, name)
863-
864863
local args = opts.args ~= '' and (' ' .. opts.args) or ''
865864
local bang = opts.bang
866865

@@ -870,9 +869,10 @@ function Plugin:cmd(commands)
870869
execute(name, bang, args)
871870
end,
872871
})
873-
else
874-
execute(name, bang, args)
872+
return
875873
end
874+
self:load()
875+
execute(name, bang, args)
876876
end, {
877877
nargs = '*',
878878
bang = true,

0 commit comments

Comments
 (0)