From bc23f85b559fed5f350468b0d01f5b9b0b3233ff Mon Sep 17 00:00:00 2001 From: newtonne <14221622+newtonne@users.noreply.github.com> Date: Sun, 14 May 2023 13:38:55 +0100 Subject: [PATCH] Always switch to correct loclist after running `:LspShowDiags` Fixes #300 --- autoload/lsp/diag.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index f812c40..5b28f60 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -404,6 +404,9 @@ def DiagsUpdateLocList(bnr: number): bool setbufvar(bnr, 'LspQfId', getloclist(0, {id: 0}).id) endif + var LspQfNr: number = getloclist(0, {id: LspQfId, nr: 0}).nr + silent! exe $':{LspQfNr} lhistory' + return true enddef -- 2.50.0