diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-11-09 21:16:09 -0800 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-11-09 21:16:09 -0800 |
commit | c01289dddea2398fe7f4335f5d0babc4a9e789c5 (patch) | |
tree | 26aa680c9633a19f1692140f00750aba615b7db5 /apps/tile/main.mu | |
parent | 148f2c9b65bcb53379d1c6bf7ec1204735bb2393 (diff) | |
download | mu-c01289dddea2398fe7f4335f5d0babc4a9e789c5.tar.gz |
7218
This bug was incredibly painful to track down: the one-line fix is to replace 'line' with 'first-line' in the call to 'evaluate' in render-line before recursing. Things that made it challenging: - A high degree of coiling with recursive calls and multiple places of evaluation. - An accidental aliasing in bindings (when rendering the main column in render-line) that masked the underlying bug and made things seem to work most of the time. - Too many fucking arguments to render-line, a maze of twisty line objects all alike.
Diffstat (limited to 'apps/tile/main.mu')
-rw-r--r-- | apps/tile/main.mu | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/tile/main.mu b/apps/tile/main.mu index 6b18e82e..457c9816 100644 --- a/apps/tile/main.mu +++ b/apps/tile/main.mu @@ -71,11 +71,14 @@ fn test { 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 " + 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 + process env, 0xa # newline: expand render env -#? var fake-screen-ah/eax: (addr handle screen) <- get env, screen -#? var fake-screen/eax: (addr screen) <- lookup *fake-screen-ah -#? render-screen 0, 1, 1, fake-screen } fn process-all env: (addr environment), cmds: (addr array byte) { |