mirror of
https://github.com/hsoft/collapseos.git
synced 2024-09-06 14:28:45 +10:00
Previously, it would keep the old buffer displayed why typing over it. I had kept it thus because I didn't want to erase the buffer right away because the behavior is that when we type nothing, we keep the buffer as-is and repeat the action. Now, the behavior of I and F is much better. It keeps the buffer displayed until the first non-return keystroke and then erases it. Also, fixed PSP leak in _type and fixed PSP overuse in successful _F (they balanced out).
11 lines
382 B
Plaintext
11 lines
382 B
Plaintext
: _F ( F without _type and _pln. used in VE )
|
|
FBUF EDPOS @ _cpos ( a1 a2 )
|
|
BEGIN
|
|
C@+ ROT ( a2+1 c2 a1 ) C@+ ROT ( a2+1 a1+1 c1 c2 )
|
|
= NOT IF DROP FBUF THEN ( a2 a1 )
|
|
TUCK C@ 0xd = ( a1 a2 f1 )
|
|
OVER BLK) = OR ( a1 a2 f1|f2 )
|
|
UNTIL ( a1 a2 )
|
|
DUP BLK) < IF BLK( - FBUF + -^ EDPOS ! ELSE DROP THEN ;
|
|
: F FBUF _type _F EDPOS @ 64 / _pln ;
|