diff options
author | Kartik Agaram <github@akkartik.com> | 2021-03-08 16:12:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-08 16:12:27 -0800 |
commit | de349209add7fc50ae7464cb0ac17214254f6315 (patch) | |
tree | 316db013ed6bafc8e5cda24da4f4ea430afdf612 | |
parent | de7713d97470528ee47031f64446d45555ee7a10 (diff) | |
parent | 96e75f1070180c44aae6328f4c702ed00e7a813a (diff) | |
download | mu-de349209add7fc50ae7464cb0ac17214254f6315.tar.gz |
Merge pull request #46 from tekknolagi/main
Add j/k keybindings for navigating trace
-rw-r--r-- | shell/trace.mu | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/shell/trace.mu b/shell/trace.mu index e3269088..b8e1e00d 100644 --- a/shell/trace.mu +++ b/shell/trace.mu @@ -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 |