From 65dec7a2598e641fe48d51c2e759ea9c89175892 Mon Sep 17 00:00:00 2001 From: d6 Date: Tue, 14 Feb 2023 20:12:46 -0500 Subject: [PATCH] fix bug with insert-n-spaces --- term.tal | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/term.tal b/term.tal index d37277c..6c37588 100644 --- a/term.tal +++ b/term.tal @@ -977,7 +977,6 @@ @insert-n-spaces ( n* -> ) STH2 ( [n*] ) - .irm LDZ #00 EQU ?&replace ( [n*] ) eol-addr #0001 SUB2 ( last* [n*] ) STH2kr DUP2 ADD2 SUB2 ( start=last-2n* [n*] ) cur-addr SWP2 ( end* start* [n*] ) @@ -987,9 +986,8 @@ STA2 #0002 SUB2 ( end* pos-2* [n* 2n*] ) GTH2k #00 EQU ?&loop ( end* pos-2* [n* 2n*] ) POP2 POP2 POP2r ( [n*] ) - &replace ( [n*] ) - LIT2r 0000 SWP2r SUB2r ( [-n*] ) - #0200 cur-addr ( 0200 cur* [-n*] ) + LIT2r 0000 SWP2r SUB2r ( [-n*] ) + #0200 cur-addr ( 0200 cur* [-n*] ) &loop2 ( 0200 pos* [-i*] ) STA2k INC2 INC2 INC2r ( 0200 pos+2* [-i+1*] ) ORAkr STHr ?&loop2 ( 0200 pos+2* [-i+1*] )