From 12d8d058a970bfbf5e4cc0e85f3e41cf58aa4b2a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 28 May 2024 18:47:29 -0700 Subject: [PATCH] Fixed issue with delete --- gui/notepad/src/notepad.tal | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/notepad/src/notepad.tal b/gui/notepad/src/notepad.tal index 56e1c3f..1b93b60 100644 --- a/gui/notepad/src/notepad.tal +++ b/gui/notepad/src/notepad.tal @@ -70,8 +70,7 @@ DUP #08 NEQ ?{ erase } DUP #7f NEQ ?{ delete } DUP #09 LTH ?{ DUP insert } - POP #00 ;on-frame/f STA - BRK + POP BRK @on-mouse-head ( -> ) [ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;mouse-icn @@ -123,6 +122,8 @@ @|editor ) @insert ( char -- ) + DUP #7f LTH ?{ POP JMP2r } + #00 ;on-frame/f STA get-from scap/ get-page #1000 ADD2 LTH2 ?{ POP JMP2r } ( | convert linebreaks ) DUP #0d EQU #03 MUL SUB .selection/length LDZ2 #0000 EQU2 ?{ erase-selection } @@ -132,6 +133,7 @@ !file-save @erase ( -- ) + #00 ;on-frame/f STA .selection/length LDZ2 #0000 EQU2 ?{ erase-selection ! } get-from get-page NEQ2 [ JMP JMP2r ] get-from #0001 SUB2 DUP2 cut-char !file-save @@ -141,6 +143,7 @@ !file-save @delete ( -- ) + #00 ;on-frame/f STA get-eof get-from SUB2 ORA #01 [ JCN JMP2r ] .selection/length LDZ2 #0000 EQU2 ?{ erase-selection ! } get-from cut-char !file-save