(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
( TODOs:
> Mouse2 select word
> Up and down arrows
> Save/Load )
@ -61,6 +60,8 @@ BRK
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 #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 #80 NEQ ?&no-r select-right &no-r
DUP #44 NEQ ?&no-sl .selection/to LDZ2 #0001 SUB2 select-to &no-sl
@ -119,6 +120,9 @@ BRK
trap-mouse
[ LIT &last $1 ] .Mouse/state DEI
DUP2 #0002 NEQ2 ?&no-mouse2
get-position select-word
&no-mouse2
DUP2 #0001 NEQ2 ?&no-down
get-position select-from
&no-down
@ -263,6 +267,14 @@ BRK
!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 ( -- )
get-page
@ -273,6 +285,18 @@ BRK
!redraw
@select-up ( -- )
( TODO )
JMP2r
@select-down ( -- )
( TODO )
JMP2r
@select-left ( -- )
.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
@appicon ( 24x24 ) [
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
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
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
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
f8f8 00f8 00f8 0000 fcfc fcfc fc04 fc00 ]
@mem ( placeholder )