mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 19:20:55 +11:00
f6ded7712e
This is the first commit I do entirely in VE. It's a habit I'm planning on taking as it helps a lot to find usability issues.
17 lines
581 B
Plaintext
17 lines
581 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 1+ ( ilen becomes rbuffsize+1 ) THEN
|
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
|
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
|
|
|
|
|
|