~rabbits/left

0474ce1729d54266eab87ffdc4a7b1203ddb6629 — Devine Lu Linvega 13 days ago fbc705c
Faster init vector
1 files changed, 6 insertions(+), 14 deletions(-)

M src/left.tal
M src/left.tal => src/left.tal +6 -14
@@ 44,17 44,16 @@
		DUP2 #0020 SUB2 #04 SFT2 .textarea/lines STZ2
		DUP2 #0018 SUB2 .scrollbar/height STZ2
		#06 SFT2 INC SUB ;draw-textarea/height STA
	.Screen/width DEI2 #0088 SUB2 #03 SFT2 SUB ;draw-textarea/width STA
	.Screen/width DEI2
		#0088 SUB2 #03 SFT2 SUB ;draw-textarea/width STA
	( defaults )
	#0001 .scroll/ratio STZ2
	;text .scroll/addr STZ2
	;text select-start
	( begin )
	draw-menu
	[ LIT2 15 -Screen/auto ] DEO
	file-new
	#01 draw-state
	draw-spacer
	file-new
	( unlock )
	;on-console .Console/vector DEO2
	untrap


@@ 261,9 260,8 @@ JMP2r
@on-mouse ( -> )

	.Mouse/y DEI2 #0014 LTH2 ?trap-menu
	#00 .Mouse/state DEI NEQ #41 ADD ;cursor-icn update-cursor
	[ LIT2 00 -Mouse/state ] DEI NEQ #41 ADD ;cursor-icn update-cursor

	[ LIT2 15 -Screen/auto ] DEO
	( scroll )
	.Mouse/scrolly DEI2 .scroll/y LDZ2 ADD2 scroll-to
	( routing )


@@ 291,12 289,7 @@ BRK
		[ #04 ] NEQk NIP ?&no-shift
			POP select-end !&no-down
			&no-shift
		[ #02 ] NEQk NIP ?&no-alt
			POP select-word
			[ LIT2 00 -Mouse/state ] DEO !&no-down
			&no-alt
		POP
		select-start
		POP select-start
		&no-down
	( mouse2 )
	DUP2 #0200 NEQ2 ?&no-down2


@@ 1116,10 1109,9 @@ JMP2r
@redraw-all ( -- )

	draw-spacer
	draw-scrollbar
	draw-navbar

( fall-through )
( >> )

@draw-textarea ( -- )