Add j/k keybindings for navigating trace

These are familiar for Vim users.
This commit is contained in:
Max Bernstein 2021-03-08 15:40:49 -08:00
parent de7713d974
commit 96e75f1070
1 changed files with 16 additions and 0 deletions

View File

@ -690,6 +690,14 @@ fn edit-trace _self: (addr trace), key: grapheme {
increment *cursor-y
return
}
# cursor down
{
compare key, 0x6a/j
break-if-!=
var cursor-y/eax: (addr int) <- get self, cursor-y
increment *cursor-y
return
}
# cursor up
{
compare key, 0x15/ctrl-u
@ -698,6 +706,14 @@ fn edit-trace _self: (addr trace), key: grapheme {
decrement *cursor-y
return
}
# cursor up
{
compare key, 0x6b/k
break-if-!=
var cursor-y/eax: (addr int) <- get self, cursor-y
decrement *cursor-y
return
}
# enter = expand
{
compare key, 0xa/newline