diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-15 20:37:11 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-15 20:37:11 -0700 |
commit | 6fdfd5607bc28e04f5c122ef9585489c2d8c9cfe (patch) | |
tree | 09504c2a57d64aa04c2b1d37370f7618160003c2 /apps/tile | |
parent | 49ed062cb1fd364d6c794db4092920d54d516abc (diff) | |
download | mu-6fdfd5607bc28e04f5c122ef9585489c2d8c9cfe.tar.gz |
7034
Finally following up on commit 7020. Ctrl-a and ctrl-e now work, but word-wise motions are still showing some funkiness.
Diffstat (limited to 'apps/tile')
-rw-r--r-- | apps/tile/main.mu | 2 | ||||
-rw-r--r-- | apps/tile/word.mu | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/tile/main.mu b/apps/tile/main.mu index 611289f9..57def626 100644 --- a/apps/tile/main.mu +++ b/apps/tile/main.mu @@ -77,6 +77,8 @@ fn test { initialize-environment-with-fake-screen env, 5, 0xa var g/eax: grapheme <- copy 0x61 # 'a' process env, g + g <- copy 0x20 # space + process env, g g <- copy 1 # 'ctrl-a' process env, g g <- copy 5 # 'ctrl-e' diff --git a/apps/tile/word.mu b/apps/tile/word.mu index 7d44475c..3d43a593 100644 --- a/apps/tile/word.mu +++ b/apps/tile/word.mu @@ -79,12 +79,15 @@ fn first-word _in: (addr handle word), out: (addr handle word) { } fn final-word _in: (addr handle word), out: (addr handle word) { - var curr-ah/esi: (addr handle word) <- copy _in - var curr/eax: (addr word) <- lookup *curr-ah + var curr-h: (handle word) + var curr-ah/esi: (addr handle word) <- address curr-h + copy-object _in, curr-ah + var curr/eax: (addr word) <- copy 0 var next/edi: (addr handle word) <- copy 0 { + curr <- lookup *curr-ah next <- get curr, next - var curr/eax: (addr word) <- lookup *next + curr <- lookup *next compare curr, 0 break-if-= copy-object next, curr-ah |