Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions autoload/lsp/ui/vim/output.vim
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ function! lsp#ui#vim#output#preview(data) abort
let l:bufferlines = line('$')
let l:maxwidth = max(map(getline(1, '$'), 'strdisplaywidth(v:val)'))

if g:lsp_preview_keep_focus
" restore focus to the previous window
call win_gotoid(l:current_window_id)
endif
" restore focus to the previous window
call win_gotoid(l:current_window_id)

echo ''

Expand All @@ -216,6 +214,11 @@ function! lsp#ui#vim#output#preview(data) abort
endif
doautocmd User lsp_float_opened
endif

if !g:lsp_preview_keep_focus
" set the focus to the preview window
call win_gotoid(s:winid)
endif
return ''
endfunction

Expand Down