From 74e211eedaddf810e15996e56f7e4eca76cb4a6b Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Sun, 28 Jun 2020 20:34:39 -0400 Subject: [PATCH] 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. --- blk/109 | 5 +++-- blk/130 | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blk/109 b/blk/109 index 9b2d09e..27a6944 100644 --- a/blk/109 +++ b/blk/109 @@ -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 ; diff --git a/blk/130 b/blk/130 index 46c9ab1..3d94658 100644 --- a/blk/130 +++ b/blk/130 @@ -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 ;