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