mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: parent folder not tracking CWD (#581)
This commit is contained in:
parent
ba0c860b2e
commit
a9ce714571
2 changed files with 8 additions and 6 deletions
|
|
@ -49,10 +49,6 @@ impl Folder {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.arrow(0);
|
self.arrow(0);
|
||||||
if self.files.is_empty() {
|
|
||||||
self.tracing = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
self.files.revision != revision
|
self.files.revision != revision
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,13 +84,19 @@ impl Tab {
|
||||||
|
|
||||||
apply(&mut self.current);
|
apply(&mut self.current);
|
||||||
|
|
||||||
|
if let Some(parent) = &mut self.parent {
|
||||||
|
apply(parent);
|
||||||
|
|
||||||
|
// The parent should always track the CWD
|
||||||
|
parent.hover(&self.current.cwd);
|
||||||
|
parent.tracing = parent.hovered().map(|h| &h.url) == Some(&self.current.cwd);
|
||||||
|
}
|
||||||
|
|
||||||
self
|
self
|
||||||
.current
|
.current
|
||||||
.hovered()
|
.hovered()
|
||||||
.filter(|h| h.is_dir())
|
.filter(|h| h.is_dir())
|
||||||
.and_then(|h| self.history.get_mut(&h.url))
|
.and_then(|h| self.history.get_mut(&h.url))
|
||||||
.map(apply);
|
.map(apply);
|
||||||
|
|
||||||
self.parent.as_mut().map(apply);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue