about summary refs log tree commit diff stats
path: root/apps/tile/environment.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-09-17 22:00:09 -0700
committerKartik Agaram <vc@akkartik.com>2020-09-17 22:00:09 -0700
commit47821f1bddd6b5401b36e08043f28c6dd63e4ae4 (patch)
treed19c538c1aabd971318290cf8854bf60577d3ad3 /apps/tile/environment.mu
parent7ecfd5eba9d9f45a2ccd5237bd68d8b24b26978b (diff)
downloadmu-47821f1bddd6b5401b36e08043f28c6dd63e4ae4.tar.gz
6797
Diffstat (limited to 'apps/tile/environment.mu')
-rw-r--r--apps/tile/environment.mu22
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
     }