From cbe90c6a2b06747f91de0e508982813ce6604137 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Tue, 20 Oct 2020 13:39:31 -0700 Subject: 7084 Cursor now updating right. Still a couple of bugs: ctrl-e doesn't know about multiple lines function calls don't expand right in multi-line sandboxes (but at least I'm now getting to see them in action!) --- apps/tile/environment.mu | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'apps/tile/environment.mu') diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index 80b749ff..23c2d243 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -590,8 +590,8 @@ $process-sandbox-define:body: { allocate body-ah var body/eax: (addr line) <- lookup *body-ah var body-contents/ecx: (addr handle word) <- get body, data - var final-line: (handle line) - var final-line-ah/eax: (addr handle line) <- address final-line + var final-line-storage: (handle line) + var final-line-ah/eax: (addr handle line) <- address final-line-storage final-line sandbox, final-line-ah var final-line/eax: (addr line) <- lookup *final-line-ah var final-line-contents/eax: (addr handle word) <- get final-line, data @@ -605,6 +605,11 @@ $process-sandbox-define:body: { # clear partial-name-for-function var empty-word: (handle word) copy-handle empty-word, new-name-ah + # update cursor + var final-line/eax: (addr line) <- lookup final-line-storage + var cursor-call-path-ah/ecx: (addr handle call-path-element) <- get sandbox, cursor-call-path + allocate cursor-call-path-ah # leak + initialize-path-from-line final-line, cursor-call-path-ah break $process-sandbox-define:body } # -- cgit 1.4.1-2-gfad0