1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 12:18:07 +11:00

Fix bugs in ed's U and VE's O/o

U didn't properly handle inserting on the last line and O's bounds
checks didn't make sense.
This commit is contained in:
Virgil Dupras 2020-06-28 20:34:39 -04:00
parent 5e01e6405a
commit 74e211eeda
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,6 @@
: _U ( U without P, used in VE )
15 EDPOS @ 64 / - 0 DO
15 EDPOS @ 64 / - ?DUP IF
0 DO
14 I - _mvln+
LOOP ;
LOOP THEN ;
: U _U P ;

View File

@ -8,9 +8,8 @@
DUP 0x20 >= IF
DUP EMIT EDPOS @ _cpos C! 1 EDPOS +! BLK!! 0
THEN UNTIL mode! SPC contents ;
: $O EDPOS @ 0x3c0 ( 15 * 64 ) >= IF EXIT THEN
_U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
: $o EDPOS @ 64 < IF EXIT THEN EDPOS @ 64 + EDPOS ! $O ;
: $O _U EDPOS @ 0x3c0 AND DUP pos! _cpos _zbuf BLK!! contents ;
: $o EDPOS @ 0x3c0 < IF EDPOS @ 64 + EDPOS ! $O THEN ;
: $D $H 64 icpy
acc@ 0 DO 16 EDPOS @ 64 / DO I _mvln- LOOP LOOP
BLK!! contents ;