mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
b8663c0ac3
commit
d022983830
3 changed files with 10 additions and 1 deletions
|
|
@ -73,7 +73,9 @@ impl Folder {
|
|||
FilesOp::Upserting(_, files) => self.files.update_upserting(files),
|
||||
}
|
||||
|
||||
self.trace = self.trace.take_if(|_| !self.files.is_empty() || self.stage.is_loading());
|
||||
self.repos(self.trace.clone().as_ref().map(|u| u.as_urn()));
|
||||
|
||||
(stage, revision) != (self.stage, self.files.revision)
|
||||
}
|
||||
|
||||
|
|
@ -97,7 +99,7 @@ impl Folder {
|
|||
self.prev(step)
|
||||
};
|
||||
|
||||
self.trace = self.hovered().filter(|_| b).map(|h| h.urn_owned()).or(mem::take(&mut self.trace));
|
||||
self.trace = self.hovered().filter(|_| b).map(|h| h.urn_owned()).or(self.trace.take());
|
||||
b |= self.squeeze_offset();
|
||||
|
||||
self.sync_page(false);
|
||||
|
|
|
|||
|
|
@ -131,8 +131,10 @@ impl Tab {
|
|||
};
|
||||
|
||||
apply(&mut self.current);
|
||||
|
||||
if let Some(parent) = &mut self.parent {
|
||||
apply(parent);
|
||||
parent.hover(self.current.url.urn()); // The parent should always track the CWD
|
||||
}
|
||||
|
||||
self
|
||||
|
|
|
|||
|
|
@ -8,6 +8,11 @@ pub enum FolderStage {
|
|||
Failed(std::io::ErrorKind),
|
||||
}
|
||||
|
||||
impl FolderStage {
|
||||
#[inline]
|
||||
pub fn is_loading(self) -> bool { self == Self::Loading }
|
||||
}
|
||||
|
||||
impl Serialize for FolderStage {
|
||||
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
|
||||
let mut map = serializer.serialize_map(Some(2))?;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue