]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Cursor not positioned correctly when jumping to a symbol in another file
authorYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 18 Jun 2023 05:47:26 +0000 (22:47 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Sun, 18 Jun 2023 05:47:26 +0000 (22:47 -0700)
autoload/lsp/symbol.vim
doc/lsp.txt

index ae193877a398248f02c196fe4032716c39c2a9c3..081af96e34b29a8949485d66941bc33a6305c019 100644 (file)
@@ -124,7 +124,7 @@ def JumpToWorkspaceSymbol(cmdmods: string, popupID: number, result: number): voi
     # 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
index 11857564918316fa05f88b8244e991fdfd70876d..4040ad459fd53fe475de7f1d0936206f407990fe 100644 (file)
@@ -1301,7 +1301,9 @@ LspAttached                       A |User| autocommand fired when the LSP client
 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*