mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 04:08:06 +11:00
7cad9ffe40
There wasn't much of a reason to leave a loop early on 0x0d or null. The idea was that once you have a CR or null, the rest is garbage and you shouldn't see it. However, it brought a problem: In VE, you couldn't insert characters past that limit. It would be written, but never displayed. So let's get rid of this logic and simply always display a 64x16 grid.
16 lines
585 B
Plaintext
16 lines
585 B
Plaintext
: _blen ( buf -- length of str in buf )
|
|
DUP BEGIN C@+ 0x20 < UNTIL -^ 1- ;
|
|
: _rbufsz ( size of linebuf to the right of curpos )
|
|
EDPOS @ 64 MOD 63 -^ ;
|
|
: i COMPILE I ; IMMEDIATE ( save overshadowed )
|
|
: _I ( I without _pln and _type. used in VE )
|
|
_rbufsz IBUF _blen 2DUP > IF
|
|
TUCK - ( ilen chars-to-move )
|
|
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
|
|
3 PICK MOVE- ( ctm ilen )
|
|
NIP ( ilen )
|
|
ELSE DROP ( ilen becomes rbuffsize )
|
|
THEN
|
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
|
: I IBUF _type _I EDPOS @ 64 / _pln ;
|