mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(completion): prevent K_LUA from closing pum
This commit is contained in:
parent
8f27c4a041
commit
42e5fd32b0
@ -3620,7 +3620,7 @@ static bool ins_compl_prep(int c)
|
||||
// Ignore end of Select mode mapping and mouse scroll buttons.
|
||||
if (c == K_SELECT || c == K_MOUSEDOWN || c == K_MOUSEUP
|
||||
|| c == K_MOUSELEFT || c == K_MOUSERIGHT || c == K_EVENT
|
||||
|| c == K_COMMAND) {
|
||||
|| c == K_COMMAND || c == K_LUA) {
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -820,6 +820,16 @@ describe('nvim_set_keymap, nvim_del_keymap', function()
|
||||
eq(99, exec_lua[[return SomeValue]])
|
||||
end)
|
||||
|
||||
it('does not reset pum in lua mapping', function()
|
||||
eq(0, exec_lua [[
|
||||
VisibleCount = 0
|
||||
vim.api.nvim_set_keymap ('i', '<F2>', '', {callback = function() VisibleCount = VisibleCount + vim.fn.pumvisible() end})
|
||||
return VisibleCount
|
||||
]])
|
||||
feed('i<C-X><C-V><F2><F2><esc>')
|
||||
eq(2, exec_lua[[return VisibleCount]])
|
||||
end)
|
||||
|
||||
it('can overwrite lua mappings', function()
|
||||
eq(0, exec_lua [[
|
||||
GlobalCount = 0
|
||||
|
Loading…
Reference in New Issue
Block a user