diff options
author | Hirokazu Hata <h.hata.ai.t@gmail.com> | 2020-04-19 02:04:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 19:04:47 +0200 |
commit | c5466ba6ef8333183e1c43c7e762e44539fb2358 (patch) | |
tree | 8b6c170f88d3f70130ba9283f0e2cdc1e515ee24 /runtime/lua/vim/lsp/util.lua | |
parent | 7d4451c65785ef7e781bf5029da059fb77b728b7 (diff) | |
download | rneovim-c5466ba6ef8333183e1c43c7e762e44539fb2358.tar.gz rneovim-c5466ba6ef8333183e1c43c7e762e44539fb2358.tar.bz2 rneovim-c5466ba6ef8333183e1c43c7e762e44539fb2358.zip |
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.
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 1a8d7dc084..763e9719a7 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -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 |