Merge pull request #1151 from rhysd/fix-1141

Add missing return on empty hover contents
This commit is contained in:
Linda_pp
2021-04-27 12:19:58 +09:00
committed by GitHub

View File

@@ -46,6 +46,7 @@ function! s:show_hover(server_name, request, response) abort
if !has_key(a:response, 'result') || empty(a:response['result']) || if !has_key(a:response, 'result') || empty(a:response['result']) ||
\ empty(a:response['result']['contents']) \ empty(a:response['result']['contents'])
call lsp#utils#error('No hover information found in server - ' . a:server_name) call lsp#utils#error('No hover information found in server - ' . a:server_name)
return
endif endif
call lsp#ui#vim#output#preview(a:server_name, a:response['result']['contents'], {'statusline': ' LSP Hover'}) call lsp#ui#vim#output#preview(a:server_name, a:response['result']['contents'], {'statusline': ' LSP Hover'})