diff --git a/README.md b/README.md index f47cbee7..efd0796a 100644 --- a/README.md +++ b/README.md @@ -389,7 +389,8 @@ MiniDeps.add({ local pos = vim.g.ui_cmdline_pos -- (1, 0)-indexed return { pos[1] - 1, pos[2] } end - return { vim.o.lines - 1, 0 } + local height = (vim.o.cmdheight == 0) and 1 or vim.o.cmdheight + return { vim.o.lines - height, 0 } end, -- Controls how the completion items are rendered on the popup window diff --git a/lua/blink/cmp/config/completion/menu.lua b/lua/blink/cmp/config/completion/menu.lua index 67e73ab2..64c5ba0e 100644 --- a/lua/blink/cmp/config/completion/menu.lua +++ b/lua/blink/cmp/config/completion/menu.lua @@ -47,7 +47,8 @@ local window = { local pos = vim.g.ui_cmdline_pos -- (1, 0)-indexed return { pos[1] - 1, pos[2] } end - return { vim.o.lines - 1, 0 } + local height = (vim.o.cmdheight == 0) and 1 or vim.o.cmdheight + return { vim.o.lines - height, 0 } end, -- Controls how the completion items are rendered on the popup window