~rabbits/left

b989cb1a4e0a5e48a66c11b5facd65b8bf66814e — Devine Lu Linvega 24 days ago b301f50
Global monospace
1 files changed, 30 insertions(+), 6 deletions(-)

M src/left.tal
M src/left.tal => src/left.tal +30 -6
@@ 14,7 14,7 @@
	@selection
		&from $2 &to $2 &length $2
	@textarea
		&highlight $1 &lines $2 &length $2
		&highlight $1 &monospace $1 &lines $2 &length $2
	@scrollbar
		&height $2
	@scroll


@@ 78,9 78,6 @@ BRK
		01 "o =file-open "Open $1
		01 "s =file-save "Save $1
		01 "q =exit "Exit $1
	02 "Go $1
		01 "/ =go-directory "Directory $1
		01 "g =go-selection "Selection $1
	08 "Edit $1
		01 "c =edit-copy "Copy $1
		01 "v =edit-paste "Paste $1


@@ 90,10 87,14 @@ BRK
		01 09 =edit-select-at "SelectWord $1
		00 1b =reset-selection "SelectReset $1
		00 00 =edit-trim "Trim $1
	02 "Go $1
		01 "/ =go-directory "Directory $1
		01 0d =go-selection "Selection $1
	01 "Find $1
		01 "f =capture-selection "Selection $1
	01 "View $1
	02 "View $1
		01 "h =toggle-highlight "Highlight $1
		01 09 =toggle-monospace "Monospace $1
	$1

(


@@ 693,6 694,12 @@ JMP2r

!draw-textarea

@toggle-monospace ( -- )

	.textarea/monospace LDZk #00 EQU SWP STZ

!draw-textarea

(
@|nav )



@@ 867,6 874,7 @@ JMP2r

@scan-fixed ( addr* -- addr* )

	.textarea/monospace LDZ ?&true
	.textarea/highlight LDZ ?&skip
	LDAk LIT "[ EQU ?&true
	DUP2 #0001 SUB2 LDA LIT "] EQU ?&false


@@ 1166,7 1174,23 @@ JMP2r
	#00 draw-filepath
	LIT2 ". 00 .filepath STZ2

!file-open
!file-open-directory

@file-open-directory ( -- )

	#0101 .textarea STZ2

	;text #ffff OVR2 SUB2 mclr
	;filepath .File/name DEO2
	#fff0 ;text SUB2 .File/length DEO2
	;text .File/read DEO2
	.File/success DEI2 .textarea/length STZ2

	reset-selection
	#01 draw-filepath
	#01

!draw-state

(
@|document )