From 78109f57411889cc8191186501f858c06d4a8888 Mon Sep 17 00:00:00 2001 From: simrat39 Date: Thu, 22 Apr 2021 17:58:23 -0700 Subject: [PATCH] fix(hover): Add more autocmd to unhover and unload state after hover --- lua/symbols-outline/hover.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/symbols-outline/hover.lua b/lua/symbols-outline/hover.lua index 0931f0a..b42bafe 100644 --- a/lua/symbols-outline/hover.lua +++ b/lua/symbols-outline/hover.lua @@ -48,12 +48,15 @@ function M.show_hover() } }) util.close_preview_autocmd({ - "CursorMoved", "BufHidden", "InsertCharPre" + "CursorMoved", "BufHidden", "InsertCharPre", "BufWipeout", "BufDelete", "WinClosed" }, winnr) return bufnr, winnr end) end) + -- kind of a hack but we want the state to always be the latest, so unload + -- this module for the next time it is called its gonna be F R E S H + package.loaded["symbols-outline.hover"] = nil end return M