diff options
author | Dheepak Krishnamurthy <me@kdheepak.com> | 2020-06-12 12:38:33 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 20:38:33 +0200 |
commit | a0a84fc9e0ba8631db35cfd7aa6a458fbdd80417 (patch) | |
tree | d45d49bfb7cb21a5bec12d59b9b56bcbc31640ec | |
parent | 6d1404faf0e4515e409044aff195656d5e6830a1 (diff) | |
download | rneovim-a0a84fc9e0ba8631db35cfd7aa6a458fbdd80417.tar.gz rneovim-a0a84fc9e0ba8631db35cfd7aa6a458fbdd80417.tar.bz2 rneovim-a0a84fc9e0ba8631db35cfd7aa6a458fbdd80417.zip |
lsp: Add `BufLeave` to `close_preview_autocmd` function call (#12477)
else popup window remains open when switching buffer.
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 49e2557c16..a4ceeb34e6 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -841,7 +841,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) - M.close_preview_autocmd({"CursorMoved", "CursorMovedI", "BufHidden"}, floating_winnr) + M.close_preview_autocmd({"CursorMoved", "CursorMovedI", "BufHidden", "BufLeave"}, floating_winnr) return floating_bufnr, floating_winnr end |