This commit is contained in:
hrsh7th
2022-01-17 19:20:09 +09:00
parent a54064d940
commit c23d810a66
2 changed files with 4 additions and 2 deletions

View File

@@ -156,16 +156,17 @@ keymap.evacuate = setmetatable({
silent = mode ~= 'c',
nowait = map.nowait,
})
elseif mode ~= 'c' then
elseif mode ~= 'c' or not map.callback then
local rhs = map.rhs
if not map.noremap then
rhs = keymap.recursive(map.lhs, rhs)
end
keymap.set_map(bufnr, mode, fallback, rhs, {
expr = false,
callback = map.callback,
noremap = map.noremap,
script = map.script,
silent = mode ~= 'c',
silent = mode ~= 'c' and map.silent,
nowait = map.nowait,
})
else

View File

@@ -15,6 +15,7 @@ describe('keymap', function()
'<C-@>',
'<C-\\>',
'<Tab>',
'<S-Tab>',
'<Plug>(example)',
'<C-r>="abc"<CR>',
'<Cmd>normal! ==<CR>',