about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-25 10:20:10 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-25 10:20:10 -0700
commite6a9f5dc1c39a00c88679e8ce808012dd383b237 (patch)
treeb7724bf59171040a29acf777577710acbe003cba
parent596490f46834f99c35bc42f6c5878ccee19b7c63 (diff)
downloadmu-e6a9f5dc1c39a00c88679e8ce808012dd383b237.tar.gz
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.
-rw-r--r--edit.mu13
1 files changed, 12 insertions, 1 deletions
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