@@ 9,7 9,7 @@
|0000
- @filepath $30
+ @filepath $2f &end $1
@search $30
@selection
&from $2 &to $2 &length $2
@@ 1175,9 1175,22 @@ JMP2r
@file-goto ( -- )
+ .selection/length LDZ2 #0040 LTH2 [ JMP JMP2r ]
+
#00 draw-filepath
- ;filepath sclr
- .selection/from LDZ2 ;filepath [ .selection/length LDZ2 #0040 LTH2k JMP SWP2 POP2 ] mcpy
+
+ ( copy selection to filepath )
+ .selection/to LDZ2 .selection/from LDZ2 [ LITr -filepath ]
+ &w
+ ( buffer end ) STHkr .filepath/end EQU ?&e
+ ( end of selection ) EQU2k ?&e
+ ( whitespace ) LDAk #21 LTH ?&e
+ LDAk STHkr STZ INC2 INCr !&w
+ &e
+ ( cap buffer ) #00 STHr STZ
+ POP2 POP2
+
+
#0000 set-scroll-y
@file-open ( -- )
@@ 1193,9 1206,9 @@ JMP2r
( draw )
reset-selection
#01 draw-filepath
- #01 !draw-state
+ #01
-( .. )
+!draw-state
&tal-ext ".tal $1
@file-save ( -- )
@@ 1205,9 1218,9 @@ JMP2r
;filepath .File/name DEO2
;text slen .File/length DEO2
;text .File/write DEO2
- #01 !draw-state
+ #01
-( .. )
+!draw-state
(
@|snarf )