~rabbits/left

ab2cb26ab8627cb6eb70aa55e083f0228c4ecc38 — neauoire 2 months ago 0c3b378
Fixed insert bug
2 files changed, 17 insertions(+), 22 deletions(-)

M src/assets.tal
M src/main.tal
M src/assets.tal => src/assets.tal +3 -3
@@ 15,7 15,7 @@
	aa55 aa55 aa55 aa55 aa55 aa55 aa55 aa55

@font-data-regular 
	0808 0100 0100 0000 0010 0000 0001 0000
	0000 0100 0100 0000 0010 0000 0001 0000
	0808 0808 0808 0808 0808 0808 0808 0808
	0404 050a 070a 0903 0505 0707 0405 0406
	0808 0808 0808 0808 0808 0404 0708 0706


@@ 225,7 225,7 @@
	0000 0000 0000 0000 0000 0000 0000 0000

@font-data-bold
	0808 0100 0100 0000 0010 0000 0001 0000
	0000 0100 0100 0000 0010 0000 0001 0000
	0808 0808 0808 0808 0808 0808 0808 0808
	0405 070b 070e 0a04 0606 0707 0505 0507
	0808 0808 0807 0808 0808 0505 0707 0707


@@ 435,7 435,7 @@
	0000 0000 0000 0000 0000 0000 0000 0000

@font-data-fixed
	0707 0707 0707 0707 070d 0707 0707 0707
	0000 0707 0707 0707 070d 0707 0707 0707
	0707 0707 0707 0707 0707 0707 0707 0707
	0707 0707 0707 0707 0707 0707 0707 0707
	0707 0707 0707 0707 0707 0707 0707 0707

M src/main.tal => src/main.tal +14 -19
@@ 337,7 337,7 @@ RTN
			POP BRK
			&no-clamp-to
		;clear-textarea JSR2
		SELECTION-LENGTH #0001 -- ;shift-left JSR2
		SELECTION-LENGTH DUP2 #0001 == TOS -- ;shift-left JSR2
		#0001 ;shift-right JSR2
		.selection/from LDZ2 STH2k STA
		STH2r #0001 ++ ;select-addr/no-clear JSR2


@@ 1103,31 1103,26 @@ RTN
@paste-snarf ( -- )
	
	;clear-textarea JSR2

	SELECTION-LENGTH DUP2 #0001 == TOS -- ;shift-left JSR2

	#fff0 ;get-eof JSR2 ;document/body ++ --

	#0200 ;shift-right JSR2

	( move beyond to end of file )
	;snarfpath-txt .File/name DEO2 
	( allow for maximum space )
	SPACE-AVAILABLE STH2k .File/length DEO2 

	( push to end of memory, eof to from )
	;get-eof JSR2 DUP2 .selection/from LDZ2 #0001 --
	&push
		( get ) OVR2 DUP2 LDA ROT ROT STH2kr ++ STA
		DECR2 GTH2k ,&push JCN
	POP2 

	#0200 .File/length DEO2 
	( insert data )
	.selection/from LDZ2 .File/load DEO2 

	( pull back to selection, from to eof )
	#0001 ++ SWP2
	&pull
		( pull ) OVR2 DUP2 STH2kr ++ LDA ROT ROT 
		( offset ) .File/success DEI2 ++ STA
		INCR2 LTH2k ,&pull JCN
	POP2 POP2
	.selection/from LDZ2 #0200 ++ .selection/to STZ2

	#0200 .File/success DEI2 -- ;shift-left JSR2

	.selection/from LDZ2 .File/success DEI2 ++ DUP2 .selection/from STZ2 #0001 ++ .selection/to STZ2

	POP2r
	RESET-SELECTION
	;draw-textarea JSR2

RTN