Skip to content

Commit 4781c30

Browse files
committed
reset cursor when exiting nav, fix #8
1 parent b6cfca1 commit 4781c30

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ impl Bk<'_> {
196196
}
197197
}
198198
view.on_resize(self);
199+
// XXX marks aren't updated
199200
}
200201
}
201202
}

src/view.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,11 @@ impl View for Nav {
143143
match kc {
144144
Esc | Tab | Left | Char('h') | Char('q') => {
145145
bk.jump_reset();
146+
bk.cursor = 0;
146147
bk.view = Some(&Page);
147148
}
148149
Enter | Right | Char('l') => {
150+
bk.cursor = 0;
149151
bk.line = 0;
150152
bk.view = Some(&Page);
151153
}

0 commit comments

Comments
 (0)