fix(sidebar): Reset old_result_lines in Sidebar:close to prevent content loss on resize (#2010)

This commit is contained in:
aniaan
2025-05-08 01:41:26 +08:00
committed by GitHub
parent 113913355a
commit 9e151ae359

View File

@@ -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