From 48265dab784825664fe3edd9ec4ea92785f01fe4 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Mon, 17 Jan 2022 19:38:17 -0800 Subject: [PATCH] After displaying the signature popup, the LSP commands for the current buffer stop working --- plugin/lsp.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin/lsp.vim b/plugin/lsp.vim index 9ece51b..63cb380 100644 --- a/plugin/lsp.vim +++ b/plugin/lsp.vim @@ -17,8 +17,10 @@ endif augroup LSPAutoCmds au! - autocmd BufNewFile,BufReadPost * lsp#addFile(bufnr('%')) - autocmd BufWipeOut * lsp#removeFile(bufnr('%')) + autocmd BufNewFile,BufReadPost * lsp#addFile(expand('')->str2nr()) + # Note that when BufWipeOut is invoked, the current buffer may be different + # from the buffer getting wiped out. + autocmd BufWipeOut * lsp#removeFile(expand('')->str2nr()) if opt.lspOptions.showDiagOnStatusLine autocmd CursorMoved * lsp#showCurrentDiagInStatusLine() endif -- 2.48.1