fix: only access mapping_info.opts field if possible
This commit is contained in:
parent
5339bc42ae
commit
7b683eaf63
1 changed files with 7 additions and 4 deletions
|
@ -90,7 +90,10 @@ M.load_mappings = function(mappings, mapping_opt)
|
||||||
-- merge default + user opts
|
-- merge default + user opts
|
||||||
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
|
local default_opts = merge_tb("force", { mode = mode }, mapping_opt or {})
|
||||||
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
local opts = merge_tb("force", default_opts, mapping_info.opts or {})
|
||||||
mapping_info.opts = nil
|
|
||||||
|
if mapping_info.opts then
|
||||||
|
mapping_info.opts = nil
|
||||||
|
end
|
||||||
|
|
||||||
set_maps(keybind, mapping_info, opts)
|
set_maps(keybind, mapping_info, opts)
|
||||||
end
|
end
|
||||||
|
@ -149,9 +152,9 @@ M.packer_sync = function(...)
|
||||||
{ "PackerSync" },
|
{ "PackerSync" },
|
||||||
{
|
{
|
||||||
" on a NvChadSnapshot. This will cause issues if NvChad dependencies contain "
|
" on a NvChadSnapshot. This will cause issues if NvChad dependencies contain "
|
||||||
.. "any breaking changes! Plugin updates will not be included in this "
|
.. "any breaking changes! Plugin updates will not be included in this "
|
||||||
.. "snapshot, so they will be lost after switching between snapshots! Would "
|
.. "snapshot, so they will be lost after switching between snapshots! Would "
|
||||||
.. "you still like to continue? [y/N]\n",
|
.. "you still like to continue? [y/N]\n",
|
||||||
"WarningMsg",
|
"WarningMsg",
|
||||||
},
|
},
|
||||||
}, false, {})
|
}, false, {})
|
||||||
|
|
Loading…
Reference in a new issue