From 4781c302a7793a9781cb065f4c9b53af0d7e4a83 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 28 Nov 2020 16:11:49 -0800 Subject: reset cursor when exiting nav, fix #8 --- src/main.rs | 1 + src/view.rs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index ac3d8cc..fedcdc6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -196,6 +196,7 @@ impl Bk<'_> { } } view.on_resize(self); + // XXX marks aren't updated } } } diff --git a/src/view.rs b/src/view.rs index d92ad58..bdbe0cc 100644 --- a/src/view.rs +++ b/src/view.rs @@ -143,9 +143,11 @@ impl View for Nav { match kc { Esc | Tab | Left | Char('h') | Char('q') => { bk.jump_reset(); + bk.cursor = 0; bk.view = Some(&Page); } Enter | Right | Char('l') => { + bk.cursor = 0; bk.line = 0; bk.view = Some(&Page); } -- cgit v1.2.3