aboutsummaryrefslogtreecommitdiff
path: root/src/event.rs
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2018-03-10 20:24:10 +0100
committerJoe Wilm <jwilm@users.noreply.github.com>2018-03-15 12:27:12 -0700
commite7a32b589f6701667bb7c0135491b6800f8716e6 (patch)
tree754efd9bf97f8fc13abc36af8722b2c2cfddd221 /src/event.rs
parentd9be2d2d88689d31d08f9218f8493635d0724860 (diff)
downloadalacritty-e7a32b589f6701667bb7c0135491b6800f8716e6.tar.gz
alacritty-e7a32b589f6701667bb7c0135491b6800f8716e6.zip
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.
Diffstat (limited to 'src/event.rs')
-rw-r--r--src/event.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/event.rs b/src/event.rs
index c079ddfb..322f0278 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()