From 7e0041c4acefaacef7043f848b830451c8f2baf1 Mon Sep 17 00:00:00 2001 From: d6 Date: Wed, 15 Feb 2023 17:30:23 -0500 Subject: [PATCH] fix wrap bug --- term.tal | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/term.tal b/term.tal index ed1e041..080c946 100644 --- a/term.tal +++ b/term.tal @@ -129,7 +129,7 @@ ;meta .System/metadata DEO2 ;meta/name .System/title DEO2 - ( 80 cols x 24 rows + 1 col for padding ) + ( 80 cols x 24 rows ) #0018 .rows STZ2 #0050 .cols STZ2 @@ -883,10 +883,10 @@ DUP #20 LTH ?read-ctrl DUP #7f EQU ?read-del .tint LDZ SWP DUP2 insert-cell draw-cell - forward ( TODO: all cursor movement should potentially set/unset this flag ) ( so this should move into forward and everything else ) .cur-x LDZ2 .max-x LDZ2 EQU2 .cur-wrap STZ + forward BRK @read-ctrl ( c^ -> BRK ) @@ -976,14 +976,17 @@ @maybe-autowrap ( -> ) .cur-wrap LDZ #00 EQU ?&skip + #00 .cur-wrap STZ +( #010e DEO ) clear-cursor #0000 .cur-x STZ2 at-max-y ?&scrolling .cur-y LDZ2k INC2 ROT STZ2 &skip JMP2r - &scrolling #010e DEO !scroll + &scrolling !scroll @insert-cell ( cell* -> ) - maybe-autowrap ( cell* ) + ( DUP #20 EQU ?&space ) ( cell* ) + maybe-autowrap ( &space ) ( cell* ) .irm LDZ #00 EQU ?&replace ( cell* ) cur-addr ( cell* lim* ) eol-addr #0002 SUB2 ( cell* lim* last=eol-2* )