diff options
Diffstat (limited to 'prototypes/tile/9.mu')
-rw-r--r-- | prototypes/tile/9.mu | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/prototypes/tile/9.mu b/prototypes/tile/9.mu index 69360b2e..ab143e25 100644 --- a/prototypes/tile/9.mu +++ b/prototypes/tile/9.mu @@ -60,14 +60,15 @@ fn interactive -> exit-status/ebx: int { $main:loop: { # process key { - var c/eax: byte <- read-key + var c/eax: grapheme <- read-key-from-real-keyboard compare c, 4 # ctrl-d break-if-= $main:loop process c, root, cursor } # render tree - root-addr <- lookup root-handle - cursor-addr <- lookup *cursor + var _root-addr/eax: (addr cell) <- lookup root-handle + root-addr <- copy _root-addr + var cursor-addr/eax: (addr cell) <- lookup *cursor render root-addr, cursor-addr loop } @@ -80,7 +81,7 @@ $main:loop: { # Tree mutations ####################################################### -fn process c: byte, root: (addr handle cell), cursor: (addr handle cell) { +fn process c: grapheme, root: (addr handle cell), cursor: (addr handle cell) { $process:body: { # if c == 'h' move cursor to its parent if possible { |