(notepad) Cut char is working

This commit is contained in:
Devine Lu Linvega 2023-04-26 14:10:39 -07:00
parent e174a4b3c4
commit 5d1ec16e79
1 changed files with 16 additions and 5 deletions

View File

@ -43,9 +43,18 @@ BRK
DUP #44 NEQ ?&no-sl .selection/to LDZ2 #0001 SUB2 select-to &no-sl DUP #44 NEQ ?&no-sl .selection/to LDZ2 #0001 SUB2 select-to &no-sl
DUP #84 NEQ ?&no-sr .selection/to LDZ2 INC2 select-to &no-sr DUP #84 NEQ ?&no-sr .selection/to LDZ2 INC2 select-to &no-sr
POP POP
.Controller/key DEI insert .Controller/key DEI
DUP #08 NEQ ?&no-bs
erase
&no-bs
DUP #7f NEQ ?&no-del
delete
&no-del
DUP #09 LTH ?&no-ascii
DUP insert
&no-ascii
POP
#00 ;on-frame/f STA #00 ;on-frame/f STA
redraw
BRK BRK
@ -145,7 +154,7 @@ BRK
@erase-selection ( -- ) @erase-selection ( -- )
.selection/from LDZ2 get-eof .selection/length LDZ2 msfl .selection/from LDZ2 get-eof .selection/length LDZ2 msfl
#0000 .selection/length LDZ2 SUB2 #0001 .selection/length LDZ2 SUB2
!mod-length !mod-length
@ -171,13 +180,14 @@ BRK
@erase ( -- ) @erase ( -- )
.selection/length LDZ2 #0001 EQU2 ?&no-block .selection/length LDZ2 #0000 EQU2 ?&no-block
erase-selection erase-selection
!reset-selection !reset-selection
&no-block &no-block
.selection/from LDZ2 ;mem NEQ2 [ JMP JMP2r ] .selection/from LDZ2 ;mem NEQ2 [ JMP JMP2r ]
.selection/from LDZ2 #0001 SUB2 .selection/from LDZ2 #0001 SUB2
DUP2 cut-char DUP2 cut-char
@ -198,13 +208,14 @@ BRK
@get-eof ( -- addr* ) @get-eof ( -- addr* )
#a000 ;mem .textarea/length LDZ2 ADD2
JMP2r JMP2r
@cut-char ( addr* -- ) @cut-char ( addr* -- )
get-eof #0001 msfl get-eof #0001 msfl
#ffff #ffff
( >> ) ( >> )