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.
This commit is contained in:
parent
4146110e0d
commit
e317e9cc78
9
blk/127
9
blk/127
@ -4,10 +4,11 @@
|
||||
3 + ( header ) SWAP 3 + ( gutter ) SWAP AT-XY ;
|
||||
: cmv ( n -- , char movement ) acc@ * EDPOS @ + pos! ;
|
||||
: buftype ( buf ln -- )
|
||||
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
||||
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
||||
SWAP DUP _zbuf C!+ DUP 63 + SWAP DO
|
||||
C< DUP 0x0d = IF LEAVE THEN i C! LOOP ;
|
||||
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 ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
4
blk/130
4
blk/130
@ -4,8 +4,8 @@
|
||||
SWAP _cpos FBUF ( len src dst ) ROT MOVE ;
|
||||
: $R ( replace mode )
|
||||
mode! 'R' EMIT
|
||||
BEGIN setpos C< DUP 0xd = NOT IF
|
||||
EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
||||
BEGIN setpos KEY DUP 0x20 >= IF
|
||||
DUP EMIT EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
|
||||
THEN UNTIL mode! SPC contents ;
|
||||
: $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN
|
||||
_U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
|
||||
|
6
blk/131
6
blk/131
@ -7,10 +7,10 @@
|
||||
: bufs
|
||||
1 aty ." I: " IBUF bufp
|
||||
2 aty ." F: " FBUF bufp 0 3 gutter ;
|
||||
: c<over KEY DUP EMIT DUP 0x0a = IF DROP 0x0d THEN ;
|
||||
: VE ['] c<over 0x08 ( C< override ) RAM+ !
|
||||
: VE
|
||||
clrscr 0 ACC ! 0 PREVPOS ! contents
|
||||
BEGIN status bufs setpos KEY handle UNTIL
|
||||
0 0x08 RAM+ ! 19 aty ;
|
||||
19 aty ;
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user