fix: remove stale popup buffers (#1530)

* fix: remove stale popup buffers

* fix: restore the logic for updating the buffer

---------

Co-authored-by: yetone <yetoneful@gmail.com>
This commit is contained in:
Kasper Seweryn
2025-03-12 09:43:25 +01:00
committed by GitHub
parent f9ab6934d2
commit c4fa4621fb
2 changed files with 12 additions and 2 deletions

View File

@@ -194,7 +194,9 @@ end
function PromptInput:close_shortcuts_hints()
if self.shortcuts_hints_winid and api.nvim_win_is_valid(self.shortcuts_hints_winid) then
local buf = api.nvim_win_get_buf(self.shortcuts_hints_winid)
api.nvim_win_close(self.shortcuts_hints_winid, true)
api.nvim_buf_delete(buf, { force = true })
self.shortcuts_hints_winid = nil
end
end