forked from NotAShelf/beer
grid: scrollback with mouse-wheel and Shift+PageUp scrolling
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I12b2ed33a705eb3474a7d14a295e021d6a6a6964
This commit is contained in:
parent
ba8f8d7144
commit
3dd953b75a
4 changed files with 201 additions and 20 deletions
13
src/vt.rs
13
src/vt.rs
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue