From: Andreas Louv Date: Mon, 3 Apr 2023 21:18:05 +0000 (+0200) Subject: Refer to buffer variable with "bufvar*" instead of "b:" X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6476f2f659a53013e7e1fa8b0f39882e723e91e3;p=vim-lsp.git Refer to buffer variable with "bufvar*" instead of "b:" --- diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index 5da9e81..cb304ce 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -280,10 +280,9 @@ def DiagsUpdateLocList(lspserver: dict, bnr: number): bool return false endif - var LspQfId: number = 0 - if bnr->getbufvar('LspQfId', 0) != 0 && - getloclist(0, {id: b:LspQfId}).id == b:LspQfId - LspQfId = b:LspQfId + var LspQfId: number = bnr->getbufvar('LspQfId', 0) + if !LspQfId->empty() && getloclist(0, {id: LspQfId}).id != LspQfId + LspQfId = 0 endif if !lspserver.diagsMap->has_key(bnr) || @@ -315,7 +314,7 @@ def DiagsUpdateLocList(lspserver: dict, bnr: number): bool endif setloclist(0, [], op, props) if LspQfId == 0 - b:LspQfId = getloclist(0, {id: 0}).id + setbufvar(bnr, 'LspQfId', getloclist(0, {id: 0}).id) endif return true