fix: check if is sidebar buf (#179)

This commit is contained in:
yetone
2024-08-24 00:14:20 +08:00
committed by GitHub
parent 43c5544a29
commit 7bea73eb80
4 changed files with 28 additions and 7 deletions

View File

@@ -799,6 +799,12 @@ function Sidebar:on_mount()
end
end,
})
for _, comp in pairs(self) do
if comp and type(comp) == "table" and comp.mount and comp.bufnr and api.nvim_buf_is_valid(comp.bufnr) then
Utils.mark_as_sidebar_buffer(comp.bufnr)
end
end
end
function Sidebar:refresh_winids()