From dd4775eb64cc6fe0a2b5897cee9749592beb95bd Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 30 May 2024 09:22:57 -0700 Subject: [PATCH] Optimized delete --- gui/notepad/src/notepad.tal | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 00de7d2..1ffa5fe 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -182,10 +182,11 @@ @delete ( -- ) #00 ;on-frame/f STA - get-eof get-from INC2 NEQ2 ?{ JMP2r } - .selection/length LDZ2 #0000 EQU2 ?{ erase-selection ! } - get-from cut-char - !file-save + .selection/length LDZ2 ORA ?{ + get-from INC2k get-eof NEQ2 ?{ POP2 JMP2r } + cut-char + !file-save } + erase-selection ! @get-eof ( -- addr* ) get-page !scap/