Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -37,6 +37,7 @@ yazi-widgets = { path = "../yazi-widgets", version = "26.1.4" }
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 @@ -38,19 +38,43 @@ 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.clone(), 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:displace, cx)?;
act!(mgr:hidden, cx)?;
act!(mgr:sort, cx).ok();

// 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)?;
act!(mgr:stash, cx, opt).ok();
Expand Down
Loading
Loading