~rabbits/dexe

ec4a9df10ae80592d1663f0d68b57bf3d8f2ab45 — neauoire a month ago 525d8ef
Implemented snarf
1 files changed, 30 insertions(+), 1 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +30 -1
@@ 220,8 220,9 @@ BRK
BRK

@on-control ( -> )
	

	.Controller/key DEI
	( file )
	DUP [ LIT 'r ] ! ,&no-name JCN
		#00 ;draw-filepath JSR2 
		;trap JSR2


@@ 245,6 246,13 @@ BRK
	DUP [ LIT 's ] ! ,&no-save JCN
		;path/name ;save-file JSR2 
		POP BRK  &no-save
	( snarf )
	DUP [ LIT 'c ] ! ,&no-copy JCN
		;copy-snarf JSR2 POP BRK
		&no-copy
	DUP [ LIT 'v ] ! ,&no-paste JCN
		;paste-snarf JSR2 POP BRK
		&no-paste
	POP 

BRK


@@ 662,6 670,27 @@ RTN

RTN

( snarf )

@snarf-txt ".snarf $1

@copy-snarf ( -- )

	;snarf-txt .File/name DEO2 
	.selection/to LDZ2 .selection/from LDZ2 -- INC2 .File/length DEO2 
	.selection/from LDZ2 .File/save DEO2

RTN

@paste-snarf ( -- )

	;snarf-txt .File/name DEO2
	#8000 .File/length DEO2
	.selection/from LDZ2 .File/load DEO2
	;redraw JSR2

RTN

( generics )

@line-hor ( x0* x1* y* color -- )