diff options
Diffstat (limited to 'sandbox/006-sandbox-copy.mu')
-rw-r--r-- | sandbox/006-sandbox-copy.mu | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sandbox/006-sandbox-copy.mu b/sandbox/006-sandbox-copy.mu index 541618e6..4b7222f3 100644 --- a/sandbox/006-sandbox-copy.mu +++ b/sandbox/006-sandbox-copy.mu @@ -154,7 +154,7 @@ def should-attempt-copy? click-row:num, click-column:num, env:&:environment -> r load-inputs # are we below the sandbox editor? click-sandbox-area?:bool <- click-on-sandbox-area? click-row, env - return-unless click-sandbox-area?, 0/false + return-unless click-sandbox-area?, false # narrower, is the click in the columns spanning the 'copy' button? first-sandbox:&:editor <- get *env, current-sandbox:offset assert first-sandbox, [!!] @@ -162,7 +162,7 @@ def should-attempt-copy? click-row:num, click-column:num, env:&:environment -> r sandbox-right-margin:num <- get *first-sandbox, right:offset _, _, copy-button-left:num, copy-button-right:num, _ <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin copy-button-vertical-area?:bool <- within-range? click-column, copy-button-left, copy-button-right - return-unless copy-button-vertical-area?, 0/false + return-unless copy-button-vertical-area?, false # finally, is sandbox editor empty? current-sandbox:&:editor <- get *env, current-sandbox:offset result <- empty-editor? current-sandbox @@ -173,8 +173,8 @@ def try-copy-sandbox click-row:num, env:&:environment -> clicked-on-copy-button? load-inputs # identify the sandbox to copy, if the click was actually on the 'copy' button sandbox:&:sandbox <- find-sandbox env, click-row - return-unless sandbox, 0/false - clicked-on-copy-button? <- copy 1/true + return-unless sandbox, false + clicked-on-copy-button? <- copy true text:text <- get *sandbox, data:offset current-sandbox:&:editor <- get *env, current-sandbox:offset current-sandbox <- insert-text current-sandbox, text @@ -201,7 +201,7 @@ def click-on-sandbox-area? click-row:num, env:&:environment -> result:bool [ local-scope load-inputs first-sandbox:&:sandbox <- get *env, sandbox:offset - return-unless first-sandbox, 0/false + return-unless first-sandbox, false first-sandbox-begins:num <- get *first-sandbox, starting-row-on-screen:offset result <- greater-or-equal click-row, first-sandbox-begins ] |