about summary refs log tree commit diff stats
path: root/sandbox/004-programming-environment.mu
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/004-programming-environment.mu')
-rw-r--r--sandbox/004-programming-environment.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/sandbox/004-programming-environment.mu b/sandbox/004-programming-environment.mu
index 1ebb696d..a29324b0 100644
--- a/sandbox/004-programming-environment.mu
+++ b/sandbox/004-programming-environment.mu
@@ -208,11 +208,18 @@ def render-sandbox-side screen:&:screen, env:&:environment, {render-editor: (rec
   left:num <- get *current-sandbox, left:offset
   right:num <- get *current-sandbox, right:offset
   row:num, column:num, screen, current-sandbox <- call render-editor, screen, current-sandbox
+  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? <- lesser-than row, screen-height
+  return-unless space-left?
   # draw solid line after code (you'll see why in later layers)
   draw-horizontal screen, row, left, right
   row <- add row, 1
+  space-left? <- lesser-than row, screen-height
+  return-unless space-left?
   clear-screen-from screen, row, left, left, right
 ]