Skip to content

Commit

Permalink
Merge pull request #3056 from bhcleek/lsp/ignore-diagnostics-when-off
Browse files Browse the repository at this point in the history
lsp: restore ignoring diagnostics
  • Loading branch information
bhcleek authored Oct 18, 2020
2 parents 0da52e0 + 556883e commit 8803940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/go/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function! s:newlsp() abort
" Vim says that a buffer name can't be an absolute path.
let l:bufname = fnamemodify(l:fname, ':.')

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

0 comments on commit 8803940

Please sign in to comment.