Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions yazi-actor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ yazi-widgets = { path = "../yazi-widgets", version = "25.9.15" }
anyhow = { workspace = true }
crossterm = { workspace = true }
futures = { workspace = true }
globset = { workspace = true }
hashbrown = { workspace = true }
mlua = { workspace = true }
paste = { workspace = true }
Expand Down
30 changes: 27 additions & 3 deletions yazi-actor/src/mgr/cd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,42 @@ impl Actor for Cd {
}

// Current
let rep = tab.history.remove_or(&opt.target);
let mut rep = tab.history.remove_or(&opt.target);

// Only force reload if folder doesn't have cached ignore filters
// If filters are cached, we can reuse the folder as-is (files are already
// filtered) This avoids the race condition where cached unfiltered files
// appear before plugin runs
if rep.files.ignore_filter().is_none() {
rep.cha = Default::default();
rep.files.update_ioerr();
rep.stage = Default::default();
}
let rep = mem::replace(&mut tab.current, rep);
tab.history.insert(rep.url.to_owned(), rep);

// Parent
if let Some(parent) = opt.target.parent() {
tab.parent = Some(tab.history.remove_or(parent));
let mut parent_folder = tab.history.remove_or(parent);
// Only force parent reload if it doesn't have cached filters
if parent_folder.files.ignore_filter().is_none() {
parent_folder.cha = Default::default();
parent_folder.files.update_ioerr();
parent_folder.stage = Default::default();
}
tab.parent = Some(parent_folder);
}

err!(Pubsub::pub_after_cd(tab.id, tab.cwd()));
act!(mgr:hidden, cx)?;
act!(mgr:sort, 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!());
Expand Down
Loading
Loading