about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-13 22:11:31 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-13 22:11:31 -0700
commitc02d45e8d4ba86b032ad2387823cb174b91232a8 (patch)
tree7775b275db826bf6473c9bedf5e1fd3366b84546
parent29361ac54e9bf671ffb7d6ba7d3e816f5dc0c14c (diff)
downloadmu-c02d45e8d4ba86b032ad2387823cb174b91232a8.tar.gz
slack: escaping from search dialog
-rw-r--r--browse-slack/environment.mu7
1 files changed, 7 insertions, 0 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index f7ae15e0..ad3646df 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -658,6 +658,13 @@ fn update-environment _env: (addr environment), key: byte, users: (addr array us
   {
     compare key, 0x1b/esc
     break-if-!=
+    {
+      var cursor-in-search?/eax: (addr boolean) <- get env, cursor-in-search?
+      compare *cursor-in-search?, 0/false
+      break-if-=
+      copy-to *cursor-in-search?, 0/false
+      return
+    }
     previous-tab env
     return
   }