mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
lsp: replace the event that closes the signature help preview window from InsertCharPre to CursolMovedI (#11954)
In the case of InsertCharPre, it is inconvenient because the signature help is displayed when backspaced in insert mode, so change it to CursolMovedI.
This commit is contained in:
@@ -522,8 +522,7 @@ function M.open_floating_preview(contents, filetype, opts)
|
||||
end
|
||||
api.nvim_buf_set_lines(floating_bufnr, 0, -1, true, contents)
|
||||
api.nvim_buf_set_option(floating_bufnr, 'modifiable', false)
|
||||
-- TODO make InsertCharPre disappearing optional?
|
||||
api.nvim_command("autocmd CursorMoved,BufHidden,InsertCharPre <buffer> ++once lua pcall(vim.api.nvim_win_close, "..floating_winnr..", true)")
|
||||
M.close_preview_autocmd({"CursorMoved", "CursorMovedI", "BufHidden"}, floating_winnr)
|
||||
return floating_bufnr, floating_winnr
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user