Fix issues where sometimes excluded files are shown and exclude patterns doesn't hide without gitignore plugin

This commit is contained in:
Carlos de Paula 2025-11-11 10:58:15 -03:00
parent 561b02d667
commit 0a286f6049
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View file

@ -76,7 +76,14 @@ impl Actor for Cd {
err!(Pubsub::pub_after_cd(tab.id, tab.cwd()));
act!(mgr:hidden, cx)?;
act!(mgr:sort, cx)?;
act!(mgr:ignore, cx)?;
// Apply config excludes if no plugin patterns are set
// This ensures config patterns work when gitignore plugin is disabled
// When plugins are enabled, they handle merging via exclude_add
if cx.tab().current.files.ignore_filter().is_none() {
act!(mgr:ignore, cx)?;
}
act!(mgr:hover, cx)?;
act!(mgr:refresh, cx)?;
succ!(render!());

View file

@ -350,6 +350,7 @@ impl Files {
let it = mem::take(&mut self.items).into_iter().chain(mem::take(&mut self.hidden));
(self.hidden, self.items) = self.split_files(it);
self.sorter.sort(&mut self.items, &self.sizes);
self.revision += 1;
true
}