From f0f077661c1f5d587602343a1a0bc82f0c99cf59 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 9 Jun 2017 23:42:58 -0700 Subject: 3904 Standardize functions to put the main object being modified first. --- html/edit/005-sandbox.mu.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'html/edit/005-sandbox.mu.html') diff --git a/html/edit/005-sandbox.mu.html b/html/edit/005-sandbox.mu.html index ed1860fe..8acb95ef 100644 --- a/html/edit/005-sandbox.mu.html +++ b/html/edit/005-sandbox.mu.html @@ -282,7 +282,7 @@ if ('onhashchange' in window) { 219 def update-status screen:&:screen, msg:text, color:num -> screen:&:screen [ 220 local-scope 221 load-ingredients - 222 screen <- move-cursor screen, 0, 2 + 222 screen <- move-cursor screen, 0, 2 223 screen <- print screen, msg, color, 238/grey/background 224 ] 225 @@ -342,13 +342,13 @@ if ('onhashchange' in window) { 279 ¦ break-if hidden? 280 ¦ # render sandbox menu 281 ¦ row <- add row, 1 - 282 ¦ screen <- move-cursor screen, row, left + 282 ¦ screen <- move-cursor screen, row, left 283 ¦ screen <- render-sandbox-menu screen, idx, left, right 284 ¦ # save menu row so we can detect clicks to it later 285 ¦ *sandbox <- put *sandbox, starting-row-on-screen:offset, row 286 ¦ # render sandbox contents 287 ¦ row <- add row, 1 - 288 ¦ screen <- move-cursor screen, row, left + 288 ¦ screen <- move-cursor screen, row, left 289 ¦ sandbox-data:text <- get *sandbox, data:offset 290 ¦ row, screen <- render-code screen, sandbox-data, left, right, row 291 ¦ *sandbox <- put *sandbox, code-ending-row-on-screen:offset, row @@ -431,7 +431,7 @@ if ('onhashchange' in window) { 368 load-ingredients 369 return-unless s 370 column:num <- copy left - 371 screen <- move-cursor screen, row, column + 371 screen <- move-cursor screen, row, column 372 screen-height:num <- screen-height screen 373 i:num <- copy 0 374 len:num <- length *s @@ -457,7 +457,7 @@ if ('onhashchange' in window) { 394 ¦ ¦ } 395 ¦ ¦ row <- add row, 1 396 ¦ ¦ column <- copy left - 397 ¦ ¦ screen <- move-cursor screen, row, column + 397 ¦ ¦ screen <- move-cursor screen, row, column 398 ¦ ¦ i <- add i, 1 399 ¦ ¦ loop +next-character 400 ¦ } @@ -470,7 +470,7 @@ if ('onhashchange' in window) { 407 ¦ ¦ print screen, wrap-icon, 245/grey 408 ¦ ¦ column <- copy left 409 ¦ ¦ row <- add row, 1 - 410 ¦ ¦ screen <- move-cursor screen, row, column + 410 ¦ ¦ screen <- move-cursor screen, row, column 411 ¦ ¦ # don't increment i 412 ¦ ¦ loop +next-character 413 ¦ } @@ -485,7 +485,7 @@ if ('onhashchange' in window) { 422 ¦ break-if was-at-left? 423 ¦ row <- add row, 1 424 } - 425 move-cursor screen, row, left + 425 move-cursor screen, row, left 426 ] 427 428 scenario read-text-wraps-barely-long-lines [ @@ -544,7 +544,7 @@ if ('onhashchange' in window) { 481 return-unless sandbox-screen 482 # print 'screen:' 483 row <- render-text screen, [screen:], left, right, 245/grey, row - 484 screen <- move-cursor screen, row, left + 484 screen <- move-cursor screen, row, left 485 # start printing sandbox-screen 486 column:num <- copy left 487 s-width:num <- screen-width sandbox-screen @@ -561,7 +561,7 @@ if ('onhashchange' in window) { 498 ¦ done? <- greater-or-equal row, screen-height 499 ¦ break-if done? 500 ¦ column <- copy left - 501 ¦ screen <- move-cursor screen, row, column + 501 ¦ screen <- move-cursor screen, row, column 502 ¦ # initial leader for each row: two spaces and a '.' 503 ¦ space:char <- copy 32/space 504 ¦ print screen, space, 245/grey @@ -995,7 +995,7 @@ if ('onhashchange' in window) { 932 ¦ scrolling?:bool <- greater-or-equal render-from, 0 933 ¦ break-unless scrolling? 934 ¦ cursor-column:num <- get *current-sandbox, left:offset - 935 ¦ screen <- move-cursor screen, 2/row, cursor-column # highlighted sandbox will always start at row 2 + 935 ¦ screen <- move-cursor screen, 2/row, cursor-column # highlighted sandbox will always start at row 2 936 ¦ return 937 } 938 ] -- cgit 1.4.1-2-gfad0