Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit 2a34610

Browse files
clktmrmattn
andauthored
Don't allow hover window to close preview window (prabirshrestha#705)
If g:lsp_preview_float is enabled there is no reason to close the preview window on LspHover and LspSignatureHelp. Moreover the preview window may be in use by other plugins or by the user. Co-authored-by: mattn <[email protected]>
1 parent 2526438 commit 2a34610

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

autoload/lsp/ui/vim/output.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ function! lsp#ui#vim#output#preview(server, data, options) abort
297297
return call(g:lsp_preview_doubletap[0], [])
298298
endif
299299
" Close any previously opened preview window
300-
pclose
300+
if !g:lsp_preview_float
301+
pclose
302+
endif
301303

302304
let l:current_window_id = win_getid()
303305

ftplugin/lsp-hover.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
if has('patch-8.1.1517') && g:lsp_preview_float && !has('nvim')
44
" Can not set buftype or popup_close will fail with 'not a popup window'
5-
setlocal previewwindow bufhidden=wipe noswapfile nobuflisted
5+
setlocal bufhidden=wipe noswapfile nobuflisted
66
else
77
setlocal previewwindow buftype=nofile bufhidden=wipe noswapfile nobuflisted
88
endif

0 commit comments

Comments
 (0)