(notepad) Starting copy/paste
This commit is contained in:
parent
52c5b31556
commit
76d1eb996e
|
@ -9,6 +9,7 @@
|
|||
> Select all
|
||||
> Copy/Paste
|
||||
> Clamp selection
|
||||
> Show blinker on last character
|
||||
> Mouse2 select word
|
||||
> Page memory mapping )
|
||||
|
||||
|
@ -43,22 +44,22 @@ BRK
|
|||
|
||||
@on-control ( -> )
|
||||
|
||||
.Controller/button DEI
|
||||
.Controller/key DEI .Controller/button DEI
|
||||
( shortcuts )
|
||||
DUP2 [ LIT2 "a 01 ] NEQ2 ?&no-ca POP2 select-all JMP2r &no-ca
|
||||
DUP2 [ LIT2 "x 01 ] NEQ2 ?&no-cx POP2 edit-cut BRK &no-cx
|
||||
DUP2 [ LIT2 "c 01 ] NEQ2 ?&no-cc POP2 edit-copy BRK &no-cc
|
||||
DUP2 [ LIT2 "v 01 ] NEQ2 ?&no-cv POP2 edit-paste BRK &no-cv
|
||||
( arrows )
|
||||
DUP #40 NEQ ?&no-l .selection/from LDZ2 #0001 SUB2 select-from &no-l
|
||||
DUP #80 NEQ ?&no-r .selection/from LDZ2 INC2 select-from &no-r
|
||||
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
|
||||
POP
|
||||
.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
|
||||
( key )
|
||||
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
|
||||
|
||||
|
@ -259,6 +260,15 @@ JMP2r
|
|||
|
||||
!redraw
|
||||
|
||||
@select-all ( -- )
|
||||
|
||||
;mem .selection/from STZ2
|
||||
;mem .textarea/length LDZ2 ADD2 #0001 SUB2 .selection/to STZ2
|
||||
|
||||
.selection/to LDZ2 .selection/from LDZ2 SUB2 .selection/length STZ2
|
||||
|
||||
!redraw
|
||||
|
||||
@is-selected ( addr* -- f )
|
||||
|
||||
DUP2 .selection/from LDZ2 LTH2 ?&false
|
||||
|
@ -268,6 +278,18 @@ JMP2r
|
|||
JMP2r
|
||||
&false POP2 #00 JMP2r
|
||||
|
||||
@edit-cut ( -- )
|
||||
|
||||
JMP2r
|
||||
|
||||
@edit-copy ( -- )
|
||||
|
||||
JMP2r
|
||||
|
||||
@edit-paste ( -- )
|
||||
|
||||
JMP2r
|
||||
|
||||
(
|
||||
@|core )
|
||||
|
||||
|
|
Loading…
Reference in New Issue