(notepad) Added select word
This commit is contained in:
parent
ece266889e
commit
1702e98960
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue