From 43f634adb0eda2fc0377423e5c5b2a7d8f087780 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 12 May 2017 07:32:46 -0700 Subject: 3852 Bugfix of commit 3850 for the sandbox/ app. I'd hoped to just quickly move past this ugly approach, but a cleaner way is more involved than I thought. This way is ugly partly because I'm introducing a bunch of conditionals without testing them. One or more of my additions may well be hiding bugs. Or I may need to add them in a few other places. The clean way is to update the fake screen model to accurately mimic the new real screen, where out of bounds prints aren't silently ignored, and where scrolling is a fact of life. --- sandbox/002-typing.mu | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sandbox/002-typing.mu') diff --git a/sandbox/002-typing.mu b/sandbox/002-typing.mu index 4f704f0d..d5120f2f 100644 --- a/sandbox/002-typing.mu +++ b/sandbox/002-typing.mu @@ -266,10 +266,17 @@ def editor-render screen:&:screen, editor:&:editor -> screen:&:screen, editor:&: left:num <- get *editor, left:offset right:num <- get *editor, right:offset row:num, column:num <- render screen, editor + screen-height:num <- screen-height screen + space-left?:bool <- lesser-than row, screen-height + return-unless space-left? clear-line-until screen, right row <- add row, 1 + space-left?:bool <- lesser-than row, screen-height + return-unless space-left? draw-horizontal screen, row, left, right, 9480/horizontal-dotted row <- add row, 1 + space-left?:bool <- lesser-than row, screen-height + return-unless space-left? clear-screen-from screen, row, left, left, right ] -- cgit 1.4.1-2-gfad0