Fixed some bugs

main
Dan7h3x 2024-11-20 13:37:24 +03:30
parent 269d2083bb
commit 3bc48198a4
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ function SignatureHelp:create_float_window(contents)
local row = cursor[1] - api.nvim_win_get_cursor(0)[1] local row = cursor[1] - api.nvim_win_get_cursor(0)[1]
local win_config = { local win_config = {
relative = "editor", relative = "cursor",
row = row + 1, row = row + 1,
col = 0, col = 0,
width = width, width = width,
@ -249,7 +249,7 @@ function SignatureHelp:setup_autocmds()
api.nvim_create_autocmd({ "CursorMovedI", "TextChangedI" }, { api.nvim_create_autocmd({ "CursorMovedI", "TextChangedI" }, {
group = group, group = group,
callback = function() callback = function()
local cmp_visible = vim.fn.exists('*cmp#visible') == 1 and vim.fn.eval('cmp#visible()') == 1 local cmp_visible = require("cmp").visible()
if cmp_visible then if cmp_visible then
self:hide() self:hide()
elseif vim.fn.pumvisible() == 0 then elseif vim.fn.pumvisible() == 0 then