Fix #893
This commit is contained in:
@@ -82,7 +82,10 @@ config.get = function()
|
|||||||
global_config.revision or 0,
|
global_config.revision or 0,
|
||||||
onetime_config.revision or 0,
|
onetime_config.revision or 0,
|
||||||
}, function()
|
}, function()
|
||||||
return misc.merge(config.normalize(onetime_config), config.normalize(global_config))
|
local c = {}
|
||||||
|
c = misc.merge(c, config.normalize(onetime_config))
|
||||||
|
c = misc.merge(c, config.normalize(global_config))
|
||||||
|
return c
|
||||||
end)
|
end)
|
||||||
elseif api.is_cmdline_mode() then
|
elseif api.is_cmdline_mode() then
|
||||||
local cmdtype = vim.fn.getcmdtype()
|
local cmdtype = vim.fn.getcmdtype()
|
||||||
@@ -94,7 +97,11 @@ config.get = function()
|
|||||||
cmdtype,
|
cmdtype,
|
||||||
cmdline_config.revision or 0,
|
cmdline_config.revision or 0,
|
||||||
}, function()
|
}, function()
|
||||||
return misc.merge(config.normalize(cmdline_config), misc.merge(global_config))
|
local c = {}
|
||||||
|
c = misc.merge(c, config.normalize(cmdline_config))
|
||||||
|
c = misc.merge(c, config.normalize(global_config))
|
||||||
|
print(vim.inspect(c.mapping))
|
||||||
|
return c
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
|
|||||||
@@ -99,6 +99,9 @@ misc.merge = function(v1, v2)
|
|||||||
if v2 == misc.none then
|
if v2 == misc.none then
|
||||||
return nil
|
return nil
|
||||||
else
|
else
|
||||||
|
if type(v2) == 'table' then
|
||||||
|
return misc.merge({}, v2)
|
||||||
|
end
|
||||||
return v2
|
return v2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -251,3 +254,4 @@ misc.redraw = setmetatable({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return misc
|
return misc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user