fix: handle error when no file selector window exists when no files (#2021)

This commit is contained in:
Peter Cardenas
2025-05-08 22:47:01 -07:00
committed by GitHub
parent dbd74aaec8
commit daa0624e50

View File

@@ -2830,7 +2830,7 @@ function Sidebar:create_selected_files_container()
local selected_filepaths_ = self.file_selector:get_selected_filepaths()
if #selected_filepaths_ == 0 then
if self.selected_files_container and api.nvim_win_is_valid(self.selected_files_container.winid) then
if Utils.is_valid_container(self.selected_files_container) then
self.selected_files_container:unmount()
self:refresh_winids()
end