diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-12-05 00:20:10 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-12-05 00:20:10 -0800 |
commit | fcdd9238cb5f03348a0a208f0d3a44e1cf8013ef (patch) | |
tree | df1e28eef8ca934d151cdaf47167da880a1d2eba /apps/tile | |
parent | 3dda906d2457a6ff577d6fa34274f43529a87dbe (diff) | |
download | mu-fcdd9238cb5f03348a0a208f0d3a44e1cf8013ef.tar.gz |
7336 - tile: back to function editing
Diffstat (limited to 'apps/tile')
-rw-r--r-- | apps/tile/environment.mu | 9 | ||||
-rw-r--r-- | apps/tile/main.mu | 13 |
2 files changed, 5 insertions, 17 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index be17254e..02ab0b0c 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -983,12 +983,13 @@ fn render _env: (addr environment) { var _screen/eax: (addr screen) <- lookup *screen-ah var screen/edi: (addr screen) <- copy _screen # repl-col - var _repl-col/eax: (addr int) <- get env, code-separator-col - var repl-col/ecx: int <- copy *_repl-col - repl-col <- add 2 # repl-margin-left + var sep-col/eax: (addr int) <- get env, code-separator-col # functions var functions/edx: (addr handle function) <- get env, functions + render-functions screen, *sep-col, env # sandbox + var repl-col/ecx: int <- copy *sep-col + repl-col <- add 2 # repl-margin-left var cursor-sandbox-ah/eax: (addr handle sandbox) <- get env, cursor-sandbox var cursor-sandbox/eax: (addr sandbox) <- lookup *cursor-sandbox-ah # bindings @@ -1524,8 +1525,6 @@ fn clear-canvas _env: (addr environment) { print-string screen, " define function " # primitives var dummy/eax: int <- render-primitives screen, *nrows, sep-col - # currently defined functions - render-functions screen, sep-col, env } # return value: top-most row written to diff --git a/apps/tile/main.mu b/apps/tile/main.mu index 94e7b1e6..120913c4 100644 --- a/apps/tile/main.mu +++ b/apps/tile/main.mu @@ -52,13 +52,12 @@ fn interactive { var env-storage: environment var env/esi: (addr environment) <- address env-storage initialize-environment env - draw-screen env { + render env var key/eax: grapheme <- read-key-from-real-keyboard compare key, 0x11 # 'ctrl-q' break-if-= process env, key - render env loop } enable-keyboard-type-mode @@ -69,16 +68,6 @@ fn test { var env-storage: environment var env/esi: (addr environment) <- address env-storage initialize-environment-with-fake-screen env, 0x20, 0xa0 - process-all env, "3 3 fake-screen =s" - process env, 0xc # ctrl-l - process-all env, "s 1 down 1 right" - process env, 4 # ctrl-d: start defining function - process-all env, "foo" - process env, 0xa # newline: define function - process env, 0x435b1b # right-arrow -#? process env, 5 # ctrl-e: end of line - print-string 0, "==\n" - process env, 0xa # newline: expand render env } |