From 2c7bb9a4d3ce3ead6de4ca6485ca67c44c0bd1c1 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 10 Mar 2018 20:24:10 +0100 Subject: Add scrollback hotkeys This offers a few additional hotkeys that can be used in combination with scrollback. None of these are used by default yet. This implements the following bindings: - ScrollPageUp: Scroll exactly one screen height up - ScrollPageDown: Scroll exactly one screen height down - ScrollToTop: Scroll as far up as possible - ScrollToBottom: Scroll as far down as possible This fixes #1151. --- src/event.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/event.rs') diff --git a/src/event.rs b/src/event.rs index b0987d58..4823d824 100644 --- a/src/event.rs +++ b/src/event.rs @@ -61,6 +61,18 @@ impl<'a, N: Notify + 'a> input::ActionContext for ActionContext<'a, N> { self.terminal.reset_scroll(); } + fn scroll_to_top(&mut self) { + self.terminal.scroll_to_top(); + } + + fn scroll_page_up(&mut self) { + self.terminal.scroll_page_up(); + } + + fn scroll_page_down(&mut self) { + self.terminal.scroll_page_down(); + } + fn copy_selection(&self, buffer: ::copypasta::Buffer) { self.terminal .selection_to_string() -- cgit v1.2.3-54-g00ecf