diff --git a/autoload/go/lsp.vim b/autoload/go/lsp.vim index b61da50b13..c8756446a3 100644 --- a/autoload/go/lsp.vim +++ b/autoload/go/lsp.vim @@ -1219,6 +1219,7 @@ function! s:highlightMatches(errorMatches, warningMatches) abort " redisplayed in an existing window: e.g. :edit, augroup vim-go-diagnostics autocmd! * + autocmd BufDelete autocmd! vim-go-diagnostics * autocmd BufWinEnter nested call s:highlightMatches(b:go_diagnostic_matches.errors, b:go_diagnostic_matches.warnings) augroup end endfunction