From 0c290cf90b825252a91c15decd36fc6dd8f0b95b Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 6 Mar 2024 03:08:54 -0700 Subject: dumb fork use for now until bk has config and such --- src/view.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/view.rs b/src/view.rs index 8194132..7f490c3 100644 --- a/src/view.rs +++ b/src/view.rs @@ -152,12 +152,12 @@ impl View for Toc { bk.cursor = 0; bk.view = &Page; } - Down | Char('j') => self.next(bk, 1), - Up | Char('k') => self.prev(bk, 1), + Down => self.next(bk, 1), + Up => self.prev(bk, 1), Home | Char('g') => self.prev(bk, bk.chapters.len()), End | Char('G') => self.next(bk, bk.chapters.len()), - PageDown | Char('f') => self.next(bk, bk.rows), - PageUp | Char('b') => self.prev(bk, bk.rows), + PageDown | Char('j' | 'f') => self.next(bk, bk.rows), + PageUp | Char('k' | 'b') => self.prev(bk, bk.rows), Char('d') => self.next(bk, bk.rows / 2), Char('u') => self.prev(bk, bk.rows / 2), _ => (), @@ -300,12 +300,12 @@ impl View for Page { } Char('d') => self.scroll_down(bk, bk.rows / 2), Char('u') => self.scroll_up(bk, bk.rows / 2), - Up | Char('k') => self.scroll_up(bk, 3), - Left | PageUp | Char('b' | 'h') => { + Up => self.scroll_up(bk, 3), + Left | PageUp | Char('k' | 'b') => { self.scroll_up(bk, bk.rows); } - Down | Char('j') => self.scroll_down(bk, 3), - Right | PageDown | Char('f' | 'l' | ' ') => self.scroll_down(bk, bk.rows), + Down => self.scroll_down(bk, 3), + Right | PageDown | Char('j' | 'f' | ' ') => self.scroll_down(bk, bk.rows), Char('[') => self.prev_chapter(bk), Char(']') => self.next_chapter(bk), _ => (), -- cgit v1.2.3