VE: disallow buffer overflow during typing
When reaching the end of the buffer when typing in IBUF or FBUF, stop typing instead of overflowing.
This commit is contained in:
parent
394f962510
commit
e83d5073ba
4
blk/127
4
blk/127
@ -6,5 +6,5 @@
|
|||||||
: buftype ( buf ln -- )
|
: buftype ( buf ln -- )
|
||||||
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
3 OVER AT-XY C< DUP 0xd = IF 2DROP DROP EXIT THEN
|
||||||
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
( buf ln c ) 63 nspcs SWAP 4 SWAP AT-XY ( buf c )
|
||||||
SWAP DUP _zbuf BEGIN ( c a )
|
SWAP DUP _zbuf C!+ DUP 63 + SWAP DO
|
||||||
C!+ C< TUCK 0x0d = UNTIL ( c a ) C! ;
|
C< DUP 0x0d = IF LEAVE THEN i C! LOOP ;
|
||||||
|
Loading…
Reference in New Issue
Block a user