fix(nvim): use coc#pum API for Enter confirmation
pumvisible() checks the native Vim pum, which coc.nvim bypasses in favour of its own popup — so the confirm never fired. Switch to coc#pum#visible() / coc#pum#confirm() to match the Tab/S-Tab bindings. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main
parent
7fe95c8b72
commit
a8e9a4b49b
|
|
@ -140,5 +140,5 @@ end, { expr = true, silent = true })
|
|||
|
||||
-- CR confirms CoC selection
|
||||
vim.keymap.set("i", "<CR>", function()
|
||||
return vim.fn.pumvisible() == 1 and "<C-Y>" or "<CR>"
|
||||
end, { expr = true })
|
||||
return vim.fn["coc#pum#visible"]() == 1 and vim.fn["coc#pum#confirm"]() or "<CR>"
|
||||
end, { expr = true, silent = true })
|
||||
|
|
|
|||
Loading…
Reference in New Issue