support bracketed paste with snarf

This commit is contained in:
~d6 2023-02-02 17:31:24 -05:00
parent 8e170bfa7f
commit c7ce127aa4
1 changed files with 20 additions and 5 deletions

View File

@ -39,13 +39,15 @@
( )
( show cursor: ESC [ ? 25 h )
( hide cursor: ESC [ ? 25 l )
( set bracketed paste mode (xterm): ESC [ ? 2004 h )
( reset bracketed paste mode (xterm): ESC [ ? 2004 l )
( set bracketed paste mode: ESC [ ? 2004 h )
( unset bracketed paste mode: ESC [ ? 2004 l )
( )
( NOT SUPPORTED YET: )
( SEMI-SUPPORTED )
( select G0 charset ($c) ESC lpar $c )
( save cursor ESC 7 )
( restore cursor ESC 7 )
( restore cursor ESC 8 )
( )
( NOT SUPPORTED YET: )
( end alt charset ESC [ 10 m )
( end alt charset ESC [ 11 m )
@ -253,7 +255,18 @@
LDAk .Console/w DEO INC2 ( limit* pos+1* )
GTH2k ?&loop POP2 POP2 JMP2r
@bracket-paste ( c^ -> )
.Console/w STH
#1b STHkr DEO
LIT "[ STHkr DEO
LIT "2 STHkr DEO
LIT "0 STHkr DEO
( c ) STHkr DEO
LIT "~ STHr DEO
JMP2r
@paste-snarf ( -> )
.paste LDZ #00 EQU ?&start LIT "0 ;bracket-paste JSR2 &start
;&path .File2/name DEO2 ( )
#0100 .File2/len DEO2 ( )
&loop ( )
@ -264,7 +277,9 @@
#0100 LTH2 ?&done ( )
!&loop ( )
&failed POP2
&done JMP2r [ &path ".snarf 00 ]
&done
.paste LDZ #00 EQU ?&end LIT "1 ;bracket-paste JSR2 &end
JMP2r [ &path ".snarf 00 ]
@on-click-down ( click^ -> )
#02 AND ?&middle-click !&done