autoload/lsp/symbol.vim | 2 +- doc/lsp.txt | 4 +++- diff --git a/autoload/lsp/symbol.vim b/autoload/lsp/symbol.vim index ae193877a398248f02c196fe4032716c39c2a9c3..081af96e34b29a8949485d66941bc33a6305c019 100644 --- a/autoload/lsp/symbol.vim +++ b/autoload/lsp/symbol.vim @@ -124,7 +124,7 @@ # Set the previous cursor location mark. Instead of using setpos(), m' is # used so that the current location is added to the jump list. :normal m' setcursorcharpos(symTbl[result - 1].pos.line + 1, - util.GetCharIdxWithoutCompChar(bnr, + util.GetCharIdxWithoutCompChar(bufnr(), symTbl[result - 1].pos) + 1) catch # ignore exceptions diff --git a/doc/lsp.txt b/doc/lsp.txt index 11857564918316fa05f88b8244e991fdfd70876d..4040ad459fd53fe475de7f1d0936206f407990fe 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -1301,7 +1301,9 @@ *LspDiagsUpdated* LspDiagsUpdated A |User| autocommand invoked when new diagnostics are received from the language server. This is invoked after the LSP client - has processed the diagnostics. + has processed the diagnostics.  The function + lsp#diag#GetDiagsForBuf() can be used to get + all the diagnostics for a buffer. ============================================================================== 12. Highlight Groups *lsp-highlight-groups*