aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2020-11-28 16:11:49 -0800
committerJames Campos <james.r.campos@gmail.com>2020-11-28 16:11:49 -0800
commit4781c302a7793a9781cb065f4c9b53af0d7e4a83 (patch)
tree62001b19320558e2d135858e740727744fddc6bc
parentb6cfca110cc90a5da88e7409aa60cdfa1fefad72 (diff)
downloadbk-4781c302a7793a9781cb065f4c9b53af0d7e4a83.tar.gz
reset cursor when exiting nav, fix #8
-rw-r--r--src/main.rs1
-rw-r--r--src/view.rs2
2 files changed, 3 insertions, 0 deletions
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);
}