fix: squeeze the parent directory offset after terminal size change (#2275)

This commit is contained in:
三咲雅 · Misaki Masa 2025-01-31 17:02:02 +08:00 committed by GitHub
parent 74ce17ebbe
commit c41f2e21e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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() }

View file

@ -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));
}
}