about summary refs log tree commit diff stats
path: root/sandbox/007-sandbox-delete.mu
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2018-06-17 00:05:38 -0700
committerKartik Agaram <vc@akkartik.com>2018-06-17 00:29:22 -0700
commitdd66068298b0a11f2a1f195376cba98e0c8570b5 (patch)
tree06696728fd65cdf38a2ac571943e130e9d60c333 /sandbox/007-sandbox-delete.mu
parentb89b822439f47a490a1b764e14a1ed1b73059cba (diff)
downloadmu-dd66068298b0a11f2a1f195376cba98e0c8570b5.tar.gz
4261 - start using literals for 'true' and 'false'
They uncovered one bug: in edit/003-shortcuts.mu
  <scroll-down> was returning 0 for an address in one place where I
  thought it was returning 0 for a boolean.

Now we've eliminated this bad interaction between tangling and punning
literals.
Diffstat (limited to 'sandbox/007-sandbox-delete.mu')
-rw-r--r--sandbox/007-sandbox-delete.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/sandbox/007-sandbox-delete.mu b/sandbox/007-sandbox-delete.mu
index 2e8ab759..01f01f42 100644
--- a/sandbox/007-sandbox-delete.mu
+++ b/sandbox/007-sandbox-delete.mu
@@ -82,7 +82,7 @@ def should-attempt-delete? click-row:num, click-column:num, env:&:environment ->
   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, [!!]
@@ -97,8 +97,8 @@ def try-delete-sandbox click-row:num, env:&:environment -> clicked-on-delete-but
   load-inputs
   # identify the sandbox to delete, if the click was actually on the 'delete' button
   sandbox:&:sandbox <- find-sandbox env, click-row
-  return-unless sandbox, 0/false
-  clicked-on-delete-button? <- copy 1/true
+  return-unless sandbox, false
+  clicked-on-delete-button? <- copy true
   env <- delete-sandbox env, sandbox
 ]