diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/gap-buffer.mu | 12 | ||||
-rw-r--r-- | shell/trace.mu | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/shell/gap-buffer.mu b/shell/gap-buffer.mu index b3c84532..616500b0 100644 --- a/shell/gap-buffer.mu +++ b/shell/gap-buffer.mu @@ -759,6 +759,18 @@ fn edit-gap-buffer self: (addr gap-buffer), key: grapheme { delete-before-gap self return } + { + compare g, 0x80/left-arrow + break-if-!= + var dummy/eax: grapheme <- gap-left self + return + } + { + compare g, 0x83/right-arrow + break-if-!= + var dummy/eax: grapheme <- gap-right self + return + } # default: insert character add-grapheme-at-gap self, g } diff --git a/shell/trace.mu b/shell/trace.mu index 0736f796..b0c43f74 100644 --- a/shell/trace.mu +++ b/shell/trace.mu @@ -690,6 +690,13 @@ fn edit-trace _self: (addr trace), key: grapheme { increment *cursor-y return } + { + compare key, 0x81/down-arrow + break-if-!= + var cursor-y/eax: (addr int) <- get self, cursor-y + increment *cursor-y + return + } # cursor up { compare key, 0x6b/k @@ -698,6 +705,13 @@ fn edit-trace _self: (addr trace), key: grapheme { decrement *cursor-y return } + { + compare key, 0x82/up-arrow + break-if-!= + var cursor-y/eax: (addr int) <- get self, cursor-y + decrement *cursor-y + return + } # enter = expand { compare key, 0xa/newline |