Skip to content

Commit

Permalink
fix: squeeze the parent directory offset after terminal size change (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Jan 31, 2025
1 parent 74ce17e commit c41f2e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions yazi-core/src/manager/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() }

Expand Down
1 change: 1 addition & 0 deletions yazi-fm/src/app/commands/resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit c41f2e2

Please sign in to comment.