collapseos/blk/127
Virgil Dupras e317e9cc78 VE: use system input buffer for IBUF and FBUF typing
This gives us backspace handling. Also, remove all usages of C<
which allows us to remove the C<* override.
2020-06-11 20:45:46 -04:00

18 lines
426 B
Plaintext

: pos! ( newpos -- ) EDPOS @ PREVPOS !
DUP 0< IF DROP 0 THEN 1023 MIN EDPOS ! ;
: setpos ( -- ) EDPOS @ 64 /MOD
3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
: cmv ( n -- , char movement ) acc@ * EDPOS @ + pos! ;
: buftype ( buf ln -- )
3 OVER AT-XY KEY DUP EMIT
DUP 0x20 < IF 2DROP DROP EXIT THEN
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c ) SWAP C!+
IN( _zbuf (rdln) IN( SWAP 63 MOVE ;