From: Yegappan Lakshmanan Date: Tue, 18 Jan 2022 03:38:17 +0000 (-0800) Subject: After displaying the signature popup, the LSP commands for the current buffer stop... X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=48265dab784825664fe3edd9ec4ea92785f01fe4;p=vim-lsp.git After displaying the signature popup, the LSP commands for the current buffer stop working --- 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