From: Yegappan Lakshmanan Date: Sun, 18 Jun 2023 13:24:19 +0000 (-0700) Subject: Decode symbol location only when needed X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5def4b894e2de66de902d7f3ccbffac4a26048b7;p=vim-lsp.git Decode symbol location only when needed --- diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index 3ef58dc..11c4afa 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -1451,12 +1451,15 @@ def WorkspaceQuerySymbols(lspserver: dict, query: string, firstCall: bool, var symInfo: list> = reply.result - symInfo->map((_, sym) => { + if lspserver.needOffsetEncoding + # Decode the position encoding in all the symbol locations + symInfo->map((_, sym) => { if sym->has_key('location') lspserver.decodeLocation(sym.location) endif return sym }) + endif if firstCall && symInfo->len() == 1 # If there is only one symbol, then jump to the symbol location