grid: scrollback with mouse-wheel and Shift+PageUp scrolling

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I12b2ed33a705eb3474a7d14a295e021d6a6a6964
This commit is contained in:
raf 2026-06-24 14:59:05 +03:00
commit 3dd953b75a
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
4 changed files with 201 additions and 20 deletions

View file

@ -123,6 +123,19 @@ impl Term {
self.grid.resize(cols, rows);
}
pub fn scroll_view(&mut self, delta: isize) {
self.grid.scroll_view(delta);
}
pub fn scroll_to_bottom(&mut self) {
self.grid.scroll_to_bottom();
}
/// Lines per page, for page-scroll bindings.
pub fn page(&self) -> usize {
self.grid.page()
}
pub fn title(&self) -> Option<&str> {
self.title.as_deref()
}