diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-09-17 22:00:09 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-09-17 22:00:09 -0700 |
commit | 47821f1bddd6b5401b36e08043f28c6dd63e4ae4 (patch) | |
tree | d19c538c1aabd971318290cf8854bf60577d3ad3 | |
parent | 7ecfd5eba9d9f45a2ccd5237bd68d8b24b26978b (diff) | |
download | mu-47821f1bddd6b5401b36e08043f28c6dd63e4ae4.tar.gz |
6797
-rw-r--r-- | apps/tile/environment.mu | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index c14d34af..3f96b8c8 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -71,30 +71,28 @@ $process:body: { compare key, 0x445b1b # left-arrow { break-if-!= - var foo/eax: grapheme <- gap-left buf - compare foo, -1 + var char-skipped/eax: grapheme <- gap-left buf + compare char-skipped, -1 { break-if-= -#? print-string-to-real-screen "XXX\n" - var cursor-col/eax: (addr int) <- get self, cursor-col + var cursor-row/eax: (addr int) <- get self, cursor-row + var cursor-col/ecx: (addr int) <- get self, cursor-col decrement *cursor-col -#? print-int32-decimal-to-real-screen *cursor-col -#? print-string-to-real-screen "ZZZ\n" + move-cursor screen, *cursor-row, *cursor-col } - var cursor-row/eax: (addr int) <- get self, cursor-row - var cursor-col/ecx: (addr int) <- get self, cursor-col - move-cursor screen, *cursor-row, *cursor-col break $process:body } compare key, 0x435b1b # right-arrow { break-if-!= - var foo/eax: grapheme <- gap-right buf - compare foo, -1 + var char-skipped/eax: grapheme <- gap-right buf + compare char-skipped, -1 { break-if-= - var cursor-col/eax: (addr int) <- get self, cursor-col + var cursor-row/eax: (addr int) <- get self, cursor-row + var cursor-col/ecx: (addr int) <- get self, cursor-col increment *cursor-col + move-cursor screen, *cursor-row, *cursor-col } break $process:body } |