1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-05 21:50:55 +11:00
collapseos/blk/112
Virgil Dupras 1adfd0c1a6 ed: make X and E cut to IBUF
This allows cut&paste similar to VI's
2020-06-09 22:09:15 -04:00

12 lines
335 B
Plaintext

: icpy ( n -- copy n chars from cursor to IBUF )
IBUF _zbuf EDPOS @ _cpos IBUF ( n a buf ) ROT MOVE ;
: X ( n -- )
DUP icpy EDPOS @ _cpos 2DUP + ( n a1 a1+n )
SWAP _rbufsz MOVE ( n )
( get to next line - n )
DUP EDPOS @ 0xffc0 AND 0x40 + -^ _cpos ( n a )
SWAP 0 FILL
EDPOS @ 64 / _pln ;
: E FBUF _blen X ;