Skip to content

Commit 556883e

Browse files
committed
lsp: restore ignoring diagnostics
Restore the ignoring of diagnostics when diagnostics are off and the diagnostic is not for the current buffer. This restores behavior originally created in fatih#2612 and adjusts it for the other changes made in fatih#3052.
1 parent 0da52e0 commit 556883e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

autoload/go/lsp.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function! s:newlsp() abort
248248
" Vim says that a buffer name can't be an absolute path.
249249
let l:bufname = fnamemodify(l:fname, ':.')
250250

251-
if len(l:data.diagnostics) > 0
251+
if len(l:data.diagnostics) > 0 && (l:level > 0 || bufnr(l:bufname) == bufnr(''))
252252
" make sure the buffer is listed and loaded before calling getbufline() on it
253253
if !bufexists(l:bufname)
254254
call bufadd(l:bufname)

0 commit comments

Comments
 (0)