mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
fix(cmp): only complete on <cr>
when cmp is really visible. Dont wait till it might be visible. Faster and more correct imho
This commit is contained in:
parent
4208a09df8
commit
ad22adab7d
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ return {
|
|||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
if cmp.core.view:visible() or vim.fn.pumvisible() == 1 then
|
||||
LazyVim.create_undo()
|
||||
if cmp.confirm({ select = true }) then
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue