From d29dcd1263aea339d2735898724c96e793c4c01c Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sat, 17 Oct 2020 12:32:44 -0700 Subject: 7050 --- apps/tile/environment.mu | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/tile/environment.mu b/apps/tile/environment.mu index e087920f..1eac1779 100644 --- a/apps/tile/environment.mu +++ b/apps/tile/environment.mu @@ -418,7 +418,7 @@ $process-sandbox:body: { fn process-sandbox-rename _sandbox: (addr sandbox), key: grapheme { $process-sandbox-rename:body: { var sandbox/esi: (addr sandbox) <- copy _sandbox - var new-name-ah/esi: (addr handle word) <- get sandbox, partial-name-for-cursor-word + var new-name-ah/edi: (addr handle word) <- get sandbox, partial-name-for-cursor-word # if 'esc' pressed, cancel rename compare key, 0x1b # esc $process-sandbox-rename:cancel: { @@ -431,7 +431,18 @@ $process-sandbox-rename:body: { compare key, 0xa # enter $process-sandbox-rename:commit: { break-if-!= - # HERE + var new-line-h: (handle line) + var new-line-ah/eax: (addr handle line) <- address new-line-h + allocate new-line-ah + var new-line/eax: (addr line) <- lookup *new-line-ah + initialize-line new-line + # new-line->next = sandbox->data + var new-line-next/ecx: (addr handle line) <- get new-line, next + var sandbox-slot/edx: (addr handle line) <- get sandbox, data + copy-object sandbox-slot, new-line-next + # sandbox->data = new-line + copy-handle new-line-h, sandbox-slot + # clear partial-name-for-cursor-word var empty: (handle word) copy-handle empty, new-name-ah break $process-sandbox-rename:body -- cgit 1.4.1-2-gfad0