fix: squeeze the parent directory offset after terminal size change

This commit is contained in:
sxyazi 2025-01-31 16:58:58 +08:00
parent 74ce17ebbe
commit 599086f4b6
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View file

@ -70,6 +70,9 @@ impl Manager {
#[inline] #[inline]
pub fn parent(&self) -> Option<&Folder> { self.active().parent.as_ref() } 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] #[inline]
pub fn hovered(&self) -> Option<&File> { self.active().hovered() } pub fn hovered(&self) -> Option<&File> { self.active().hovered() }

View file

@ -20,5 +20,6 @@ impl App {
self.cx.current_mut().sync_page(true); self.cx.current_mut().sync_page(true);
self.cx.manager.hover(None); self.cx.manager.hover(None);
self.cx.manager.parent_mut().map(|f| f.arrow(0));
} }
} }