diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-08-10 11:56:54 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-08-10 11:56:54 -0700 |
commit | 822553afa68fd59b28bbc6d1a9d1b75851268f5c (patch) | |
tree | 16beb0cb6559abdf5883b2b7c506def968055865 | |
parent | 37537bf347a27392433a61e44ed8ad416e8cbecd (diff) | |
download | mu-822553afa68fd59b28bbc6d1a9d1b75851268f5c.tar.gz |
1966
-rw-r--r-- | edit.mu | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/edit.mu b/edit.mu index a61940e7..1b79414d 100644 --- a/edit.mu +++ b/edit.mu @@ -335,6 +335,25 @@ recipe clear-line-delimited [ } ] +recipe clear-rest-of-screen [ + local-scope + screen:address <- next-ingredient + row:number <- next-ingredient + left:number <- next-ingredient + right:number <- next-ingredient + row <- add row, 1 + move-cursor screen, row, left + screen-height:number <- screen-height screen + { + at-bottom-of-screen?:boolean <- greater-or-equal row, screen-height + break-if at-bottom-of-screen? + move-cursor screen, row, left + clear-line-delimited screen, left, right + row <- add row, 1 + loop + } +] + scenario editor-initially-prints-multiple-lines [ assume-screen 5/width, 5/height run [ @@ -4182,25 +4201,6 @@ recipe render-recipes [ reply screen/same-as-ingredient:0 ] -recipe clear-rest-of-screen [ - local-scope - screen:address <- next-ingredient - row:number <- next-ingredient - left:number <- next-ingredient - right:number <- next-ingredient - row <- add row, 1 - move-cursor screen, row, left - screen-height:number <- screen-height screen - { - at-bottom-of-screen?:boolean <- greater-or-equal row, screen-height - break-if at-bottom-of-screen? - move-cursor screen, row, left - clear-line-delimited screen, left, right - row <- add row, 1 - loop - } -] - ## running code from the editor and creating sandboxes container sandbox-data [ |