mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 16:38:05 +11:00
ed: don't crash when inserting in 64th char of the line
This commit is contained in:
parent
7cad9ffe40
commit
a405f77185
6
blk/111
6
blk/111
@ -7,9 +7,7 @@
|
|||||||
_rbufsz IBUF _blen 2DUP > IF
|
_rbufsz IBUF _blen 2DUP > IF
|
||||||
TUCK - ( ilen chars-to-move )
|
TUCK - ( ilen chars-to-move )
|
||||||
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
|
SWAP EDPOS @ _cpos 2DUP + ( ctm ilen a a+ilen )
|
||||||
3 PICK MOVE- ( ctm ilen )
|
3 PICK MOVE- ( ctm ilen ) NIP ( ilen )
|
||||||
NIP ( ilen )
|
ELSE DROP 1+ ( ilen becomes rbuffsize+1 ) THEN
|
||||||
ELSE DROP ( ilen becomes rbuffsize )
|
|
||||||
THEN
|
|
||||||
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
DUP IBUF EDPOS @ _cpos ROT MOVE ( ilen ) EDPOS +! BLK!! ;
|
||||||
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
: I IBUF _type _I EDPOS @ 64 / _pln ;
|
||||||
|
Loading…
Reference in New Issue
Block a user