From a41b6fd17341d9e6dbbc7d7806060603ab3a9b7e Mon Sep 17 00:00:00 2001 From: bekaboo Date: Fri, 14 Mar 2025 15:23:36 -0400 Subject: fix(lsp): autocmds to close lsp preview windows not cleared Problem: Augroup to close lsp preview hover window is not cleared after the window is closed because of unmatched group name. Solution: Delete the augroup before closing the preview window with correct group name. --- runtime/lua/vim/lsp/util.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 307a55c2a2..056cb0c73c 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1345,7 +1345,7 @@ local function close_preview_window(winnr, bufnrs) return end - local augroup = 'preview_window_' .. winnr + local augroup = 'nvim.preview_window_' .. winnr pcall(api.nvim_del_augroup_by_name, augroup) pcall(api.nvim_win_close, winnr, true) end) -- cgit