diff options
author | Kartik Agaram <vc@akkartik.com> | 2020-10-10 23:38:38 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2020-10-10 23:38:42 -0700 |
commit | 28d99f031dcee8c2b9753365fbae49bf0ac1f2a0 (patch) | |
tree | 9b1fc4b4bda1c1d4d12f9fc90e86cfee2fe6fff4 /apps/tile | |
parent | cfad9c494eecf4b98eea5d4021f00ba6d7e38a02 (diff) | |
download | mu-28d99f031dcee8c2b9753365fbae49bf0ac1f2a0.tar.gz |
6999 - tile: move to previous word
Diffstat (limited to 'apps/tile')
-rw-r--r-- | apps/tile/environment.mu | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index 25f3cc70..193fbc97 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -215,6 +215,21 @@ $process:body: { toggle-cursor-word sandbox break $process:body } + compare key, 0x10 # 16 = ctrl-p + { + break-if-!= + # jump to previous word at same level + var prev-word-ah/edx: (addr handle word) <- get cursor-word, prev + var prev-word/eax: (addr word) <- lookup *prev-word-ah + { + compare prev-word, 0 + break-if-= + copy-object prev-word-ah, cursor-word-ah + cursor-to-end prev-word + var cursor-call-path/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path + decrement-final-element cursor-call-path + } + } # if cursor is within a call, disable editing hotkeys below var cursor-call-path-ah/eax: (addr handle call-path-element) <- get sandbox, cursor-call-path var cursor-call-path/eax: (addr call-path-element) <- lookup *cursor-call-path-ah |