about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-13 22:33:07 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-13 22:53:52 -0700
commit41b49669615b228385e4f3c309ea9b643e02d2ae (patch)
tree6e259deab7e4f8946a41dd2c05ba871d09beb394
parenta3559ebcc33a6032b7353ff8d2e2a88529c647bc (diff)
downloadmu-41b49669615b228385e4f3c309ea9b643e02d2ae.tar.gz
slack: notify when too many results
-rw-r--r--browse-slack/environment.mu6
1 files changed, 6 insertions, 0 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index 5c8765ff..5c51ae9f 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -241,6 +241,12 @@ fn render-search-tab screen: (addr screen), _current-tab: (addr tab), _items: (a
   set-cursor-position 0/screen, 0x68/x 0/y
   draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "search", 7/fg 0/bg
   render-progress screen, i, *current-tab-search-items-first-free-addr
+  {
+    compare *current-tab-search-items-first-free-addr, 0x100/max-search-results
+    break-if-<
+    set-cursor-position 0/screen, 0x68/x 1/y
+    draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "too many results", 4/fg 0/bg
+  }
   var items-data-ah/eax: (addr handle array item) <- get items, data
   var _items-data/eax: (addr array item) <- lookup *items-data-ah
   var items-data/edi: (addr array item) <- copy _items-data