~rabbits/left

7ce1be02073820adb889de061d36bc082064a359 — neauoire 2 months ago a8b53a3
Fixed issue with syntax highlight
1 files changed, 10 insertions(+), 8 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +10 -8
@@ 94,7 94,7 @@
|0100 

	( theme ) 
	#f076 .System/r DEO2 
	#f07f .System/r DEO2 
	#f0c6 .System/g DEO2 
	#f096 .System/b DEO2



@@ 834,9 834,6 @@ RTN

@scan-color ( addr* )

	DUP2 .selection/from LDZ2 == ,&selected JCN
	DUP2 .selection/to LDZ2 == ,&default JCN
	DUP2 .selection/from LDZ2 >> STH DUP2 .selection/to LDZ2 << STHr #0101 == ,&selected JCN
	LDAk ( left-paren ) #28 ! ,&no-paren-open JCN
		#01 ,&commented STR
		#23 ;draw-uf2-multiline/color STA RTN


@@ 847,11 844,9 @@ RTN
		&no-paren-close
	LDAk IS-SPACER #01 JCN [ RTN ]
	,&commented LDR ,&end JCN
	DUP2 #0001 ++ LDA IS-LABEL ,&label JCN
	LDAk IS-LABEL ,&label JCN
	&default
		#21 ;draw-uf2-multiline/color STA RTN
	&selected
		#28 ;draw-uf2-multiline/color STA RTN
	&label
		#22 ;draw-uf2-multiline/color STA RTN
	&end


@@ 887,6 882,7 @@ RTN
@draw-uf2-multiline ( x* y* text* -- )
	
	;font-data-regular ;draw-uf2/font STA2
	#21 ,&color STR
	SWP2 .Screen/y DEO2
	SWP2 .scroll/x LDZ2 -- DUP2 .Screen/x DEO2 SWP2
	&while


@@ 894,7 890,7 @@ RTN
		;scan-font JSR2
		( do not overdraw )
		.Screen/x DEI2 .textarea/x1 LDZ2 GTS2 ,&outside JCN
			LDAk ,&color LDR ;draw-uf2/sprite JSR2
			,&get-color JSR STH LDAk STHr ;draw-uf2/sprite JSR2
			&outside
		LDAk NOT-LINEBREAK ,&no-linebreak JCN
			#0010 .scroll/x LDZ2 -- .Screen/x DEO2


@@ 908,6 904,12 @@ RTN
	#00 ,&color LDR ;draw-uf2/sprite JSR2
	RTN
	&color $1
	&get-color ( addr* -- addr* color )
		DUP2 .selection/from LDZ2 << ,&unselected JCN
		DUP2 .selection/to LDZ2 #0001 -- >> ,&unselected JCN
		#28 RTN
		&unselected
			,&color LDR RTN

RTN