From 9e151ae359d7bc750e26f19c10786595fe57ac86 Mon Sep 17 00:00:00 2001 From: aniaan Date: Thu, 8 May 2025 01:41:26 +0800 Subject: [PATCH] fix(sidebar): Reset old_result_lines in Sidebar:close to prevent content loss on resize (#2010) --- lua/avante/sidebar.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 53d2738..542ca4a 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -221,6 +221,7 @@ function Sidebar:close(opts) for _, comp in pairs(self) do if comp and type(comp) == "table" and comp.unmount then comp:unmount() end end + self.old_result_lines = {} if opts.goto_code_win and self.code and self.code.winid and api.nvim_win_is_valid(self.code.winid) then fn.win_gotoid(self.code.winid) end