(notepad) Added select word

This commit is contained in:
Devine Lu Linvega 2023-04-27 10:08:50 -07:00
parent ece266889e
commit 1702e98960
1 changed files with 29 additions and 5 deletions

View File

@ -6,7 +6,6 @@
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 |a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
( TODOs: ( TODOs:
> Mouse2 select word
> Up and down arrows > Up and down arrows
> Save/Load ) > Save/Load )
@ -61,6 +60,8 @@ BRK
DUP2 [ LIT2 "c 01 ] NEQ2 ?&no-cc POP2 edit-copy BRK &no-cc 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 DUP2 [ LIT2 "v 01 ] NEQ2 ?&no-cv POP2 edit-paste BRK &no-cv
( arrows ) ( arrows )
DUP #10 NEQ ?&no-u select-up &no-u
DUP #20 NEQ ?&no-d select-down &no-d
DUP #40 NEQ ?&no-l select-left &no-l DUP #40 NEQ ?&no-l select-left &no-l
DUP #80 NEQ ?&no-r select-right &no-r DUP #80 NEQ ?&no-r select-right &no-r
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
@ -119,6 +120,9 @@ BRK
trap-mouse trap-mouse
[ LIT &last $1 ] .Mouse/state DEI [ LIT &last $1 ] .Mouse/state DEI
DUP2 #0002 NEQ2 ?&no-mouse2
get-position select-word
&no-mouse2
DUP2 #0001 NEQ2 ?&no-down DUP2 #0001 NEQ2 ?&no-down
get-position select-from get-position select-from
&no-down &no-down
@ -263,6 +267,14 @@ BRK
!redraw !redraw
@select-word ( addr* -- )
DUP2
&back #0001 SUB2 LDAk #20 GTH ?&back INC2 .selection/from STZ2
&next INC2 LDAk #20 GTH ?&next .selection/to STZ2
!redraw
@select-all ( -- ) @select-all ( -- )
get-page get-page
@ -273,6 +285,18 @@ BRK
!redraw !redraw
@select-up ( -- )
( TODO )
JMP2r
@select-down ( -- )
( TODO )
JMP2r
@select-left ( -- ) @select-left ( -- )
.selection/length LDZ2 #0000 EQU2 ?&no-block .selection/length LDZ2 #0000 EQU2 ?&no-block
@ -814,10 +838,10 @@ JMP2r
0000 0000 0000 0000 0000 0000 0000 00ff 0000 0000 0000 0000 ffff ffff ffff ffff ] $1 0000 0000 0000 0000 0000 0000 0000 00ff 0000 0000 0000 0000 ffff ffff ffff ffff ] $1
@appicon ( 24x24 ) [ @appicon ( 24x24 ) [
0009 161f 1f1f 1f1f 093f 3f3f 3f3f 3f3f 0024 dbff ffff ffff 24ff ffff ffff ffff 0009 161f 1f1f 1f1f 093f 3f3f 3f3f 3f3f 0024 dbff ffff ffff 24ff ffff ffff ffff
0090 68f8 f8f8 f8f8 90fc fcfc fcfc fcfc 1f1f 1f1f 1f1f 0016 3f3f 3f3f 3f3f 3f3f 0090 68f8 f8f8 f8f8 90fc fcfc fcfc fcfc 1f1f 1f1f 1f1f 0016 3f3f 3f3f 3f3f 3f3f
ffff ffff ffff ffff ffff ffff ffff ffff f8f8 f8f8 f8f8 f8f8 fcfc fcfc fcfc fcfc ffff ffff ffff ffff ffff ffff ffff ffff f8f8 f8f8 f8f8 f8f8 fcfc fcfc fcfc fcfc
1a1c 1e1f 001f 0000 3f3f 3f3f 3f20 3f00 ffff 00ff 00ff 0000 ffff ffff ff00 ff00 1a1c 1e1f 001f 0000 3f3f 3f3f 3f20 3f00 ffff 00ff 00ff 0000 ffff ffff ff00 ff00
f8f8 00f8 00f8 0000 fcfc fcfc fc04 fc00 ] f8f8 00f8 00f8 0000 fcfc fcfc fc04 fc00 ]
@mem ( placeholder ) @mem ( placeholder )