Fix #746
This commit is contained in:
@@ -156,16 +156,17 @@ keymap.evacuate = setmetatable({
|
|||||||
silent = mode ~= 'c',
|
silent = mode ~= 'c',
|
||||||
nowait = map.nowait,
|
nowait = map.nowait,
|
||||||
})
|
})
|
||||||
elseif mode ~= 'c' then
|
elseif mode ~= 'c' or not map.callback then
|
||||||
local rhs = map.rhs
|
local rhs = map.rhs
|
||||||
if not map.noremap then
|
if not map.noremap then
|
||||||
rhs = keymap.recursive(map.lhs, rhs)
|
rhs = keymap.recursive(map.lhs, rhs)
|
||||||
end
|
end
|
||||||
keymap.set_map(bufnr, mode, fallback, rhs, {
|
keymap.set_map(bufnr, mode, fallback, rhs, {
|
||||||
expr = false,
|
expr = false,
|
||||||
|
callback = map.callback,
|
||||||
noremap = map.noremap,
|
noremap = map.noremap,
|
||||||
script = map.script,
|
script = map.script,
|
||||||
silent = mode ~= 'c',
|
silent = mode ~= 'c' and map.silent,
|
||||||
nowait = map.nowait,
|
nowait = map.nowait,
|
||||||
})
|
})
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ describe('keymap', function()
|
|||||||
'<C-@>',
|
'<C-@>',
|
||||||
'<C-\\>',
|
'<C-\\>',
|
||||||
'<Tab>',
|
'<Tab>',
|
||||||
|
'<S-Tab>',
|
||||||
'<Plug>(example)',
|
'<Plug>(example)',
|
||||||
'<C-r>="abc"<CR>',
|
'<C-r>="abc"<CR>',
|
||||||
'<Cmd>normal! ==<CR>',
|
'<Cmd>normal! ==<CR>',
|
||||||
|
|||||||
Reference in New Issue
Block a user