From 6476f2f659a53013e7e1fa8b0f39882e723e91e3 Mon Sep 17 00:00:00 2001 From: Andreas Louv Date: Mon, 3 Apr 2023 23:18:05 +0200 Subject: [PATCH] Refer to buffer variable with "bufvar*" instead of "b:" --- autoload/lsp/diag.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 2.48.1