(notepad) Fixed issue with paste
This commit is contained in:
parent
daa7956831
commit
8e68ba904a
|
@ -5,7 +5,8 @@
|
|||
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||
|
||||
( TODOs:
|
||||
> Up and down arrows )
|
||||
> Up and down arrows
|
||||
> Negative length selection )
|
||||
|
||||
|0000
|
||||
|
||||
|
@ -28,7 +29,7 @@
|
|||
;on-mouse-body .Mouse/vector DEO2
|
||||
;on-frame .Screen/vector DEO2
|
||||
;on-control .Controller/vector DEO2
|
||||
|
||||
( let's go! )
|
||||
file-init
|
||||
draw-header
|
||||
#00 change-page
|
||||
|
@ -120,9 +121,6 @@ BRK
|
|||
DUP2 #0101 NEQ2 ?&no-drag
|
||||
get-position select-to
|
||||
&no-drag
|
||||
DUP2 #0100 NEQ2 ?&no-up
|
||||
( nothing )
|
||||
&no-up
|
||||
,&last STR POP
|
||||
|
||||
BRK
|
||||
|
@ -144,15 +142,15 @@ BRK
|
|||
.Mouse/y DEI2 #00d6 SUB2 NIP
|
||||
#18 .Mouse/x DEI2 NIP SUB
|
||||
ADD #18 LTH ?&go-next
|
||||
prev-page
|
||||
BRK
|
||||
&go-next next-page
|
||||
prev-page BRK
|
||||
&go-next
|
||||
next-page
|
||||
|
||||
BRK
|
||||
|
||||
@on-frame ( -> )
|
||||
|
||||
[ LIT &last $1 ] [ LIT &f $1 ] INCk ,&f STR
|
||||
[ LIT2 &last $1 &f $1 ] INCk ,&f STR
|
||||
#05 SFT DUP ,&last STR
|
||||
EQU ?&unchanged
|
||||
draw-note
|
||||
|
@ -165,14 +163,15 @@ BRK
|
|||
|
||||
@insert ( char -- )
|
||||
|
||||
( move ) #fff0 get-eof SUB2 ORA ?&valid
|
||||
( space ok )
|
||||
#fff0 get-eof SUB2 ORA ?&valid
|
||||
POP JMP2r
|
||||
&valid
|
||||
|
||||
( convert linebreaks )
|
||||
DUP #0d EQU #03 MUL SUB
|
||||
|
||||
.selection/length LDZ2 #0001 EQU2 ?&no-block
|
||||
.selection/length LDZ2 #0000 EQU2 ?&no-block
|
||||
erase-selection
|
||||
&no-block
|
||||
|
||||
|
@ -184,7 +183,7 @@ BRK
|
|||
|
||||
@erase ( -- )
|
||||
|
||||
.selection/length LDZ2 #0001 LTH2 ?&no-block
|
||||
.selection/length LDZ2 #0000 EQU2 ?&no-block
|
||||
erase-selection
|
||||
!select-reset
|
||||
&no-block
|
||||
|
@ -207,7 +206,7 @@ BRK
|
|||
|
||||
get-eof .selection/from LDZ2 SUB2 ORA #01 [ JCN JMP2r ]
|
||||
|
||||
.selection/length LDZ2 #0001 EQU2 ?&no-block
|
||||
.selection/length LDZ2 #0000 EQU2 ?&no-block
|
||||
erase-selection
|
||||
!select-reset
|
||||
&no-block
|
||||
|
@ -376,7 +375,7 @@ JMP2r
|
|||
.File/name DEO2
|
||||
STH2kr .File/length DEO2
|
||||
( erase when selection length )
|
||||
.selection/length LDZ2 #0001 EQU2 ?&no-selection
|
||||
.selection/length LDZ2 #0000 EQU2 ?&no-selection
|
||||
erase-selection
|
||||
&no-selection
|
||||
( push right ) .selection/from LDZ2 #0001 SUB2
|
||||
|
|
Loading…
Reference in New Issue