diff --git a/yazi-core/src/manager/manager.rs b/yazi-core/src/manager/manager.rs index 51c44eb09..da5b71792 100644 --- a/yazi-core/src/manager/manager.rs +++ b/yazi-core/src/manager/manager.rs @@ -70,6 +70,9 @@ impl Manager { #[inline] pub fn parent(&self) -> Option<&Folder> { self.active().parent.as_ref() } + #[inline] + pub fn parent_mut(&mut self) -> Option<&mut Folder> { self.active_mut().parent.as_mut() } + #[inline] pub fn hovered(&self) -> Option<&File> { self.active().hovered() } diff --git a/yazi-fm/src/app/commands/resize.rs b/yazi-fm/src/app/commands/resize.rs index e55930d8f..cb96e81d3 100644 --- a/yazi-fm/src/app/commands/resize.rs +++ b/yazi-fm/src/app/commands/resize.rs @@ -20,5 +20,6 @@ impl App { self.cx.current_mut().sync_page(true); self.cx.manager.hover(None); + self.cx.manager.parent_mut().map(|f| f.arrow(0)); } }