From 5def4b894e2de66de902d7f3ccbffac4a26048b7 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sun, 18 Jun 2023 06:24:19 -0700 Subject: [PATCH] Decode symbol location only when needed --- autoload/lsp/lspserver.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.48.1