From e6a9f5dc1c39a00c88679e8ce808012dd383b237 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Jun 2015 10:20:10 -0700 Subject: 1657 - 'render' shouldn't clobber other windows Another case I'm not writing tests for, after the hide-screen/show-screen pair. But this case at least will eventually get tests. --- edit.mu | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/edit.mu b/edit.mu index d8baff98..a8d0a4c5 100644 --- a/edit.mu +++ b/edit.mu @@ -192,9 +192,20 @@ recipe render [ # newline? move to left rather than 0 newline?:boolean <- equal c:character, 10:literal/newline break-unless newline?:boolean + # clear rest of line in this window +#? $print row:number, [ ], column:number, [ ], right:number, [ +#? ] #? 1 + { + done?:boolean <- greater-or-equal column:number, right:number + break-if done?:boolean + print-character screen:address, 32:literal/space + column:number <- add column:number, 1:literal +#? $print column:number, [ +#? ] #? 1 + loop + } row:number <- add row:number, 1:literal column:number <- copy left:number - clear-line screen:address move-cursor screen:address, row:number, column:number curr:address:duplex-list <- next-duplex curr:address:duplex-list loop +next-character:label -- cgit 1.4.1-2-gfad0