Fix #376
This commit is contained in:
@@ -80,13 +80,15 @@ vim.cmd [[command! CmpStatus lua require('cmp').status()]]
|
||||
|
||||
vim.cmd [[doautocmd <nomodeline> User cmp#ready]]
|
||||
|
||||
vim.on_key(function(keys)
|
||||
if keys == vim.api.nvim_replace_termcodes('<C-c>', true, true, true) then
|
||||
vim.schedule(function()
|
||||
if not api.is_suitable_mode() then
|
||||
require('cmp.utils.autocmd').emit('InsertLeave')
|
||||
end
|
||||
end)
|
||||
end
|
||||
end, vim.api.nvim_create_namespace('cmp.plugin'))
|
||||
if vim.on_key then
|
||||
vim.on_key(function(keys)
|
||||
if keys == vim.api.nvim_replace_termcodes('<C-c>', true, true, true) then
|
||||
vim.schedule(function()
|
||||
if not api.is_suitable_mode() then
|
||||
require('cmp.utils.autocmd').emit('InsertLeave')
|
||||
end
|
||||
end)
|
||||
end
|
||||
end, vim.api.nvim_create_namespace('cmp.plugin'))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user