about summary refs log tree commit diff stats
path: root/browse-slack
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-13 22:33:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-13 22:53:52 -0700
commit82a223f58f40cb480e6f64ee08a97264cf07d7a0 (patch)
treea2763c025621e4c91329c9f099d21151b4fca059 /browse-slack
parent41b49669615b228385e4f3c309ea9b643e02d2ae (diff)
downloadmu-82a223f58f40cb480e6f64ee08a97264cf07d7a0.tar.gz
slack: search cursor handling
Diffstat (limited to 'browse-slack')
-rw-r--r--browse-slack/environment.mu3
1 files changed, 2 insertions, 1 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index 5c51ae9f..756cdbe5 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -279,12 +279,13 @@ fn render-progress screen: (addr screen), curr: int, max: int {
 
 fn render-search-input screen: (addr screen), _env: (addr environment) {
   var env/esi: (addr environment) <- copy _env
+  var cursor-in-search?/ecx: (addr boolean) <- get env, cursor-in-search?
   set-cursor-position 0/screen, 0x22/x=search-position-x 1/y
   draw-text-wrapping-right-then-down-from-cursor-over-full-screen screen, "search ", 7/fg 0/bg
   var search-terms-ah/eax: (addr handle gap-buffer) <- get env, search-terms
   var search-terms/eax: (addr gap-buffer) <- lookup *search-terms-ah
   rewind-gap-buffer search-terms
-  var x/eax: int <- render-gap-buffer screen, search-terms, 0x2a/x 1/y, 1/render-cursor, 0xf/fg 0/bg
+  var x/eax: int <- render-gap-buffer screen, search-terms, 0x2a/x 1/y, *cursor-in-search?, 0xf/fg 0/bg
   {
     compare x, 0x4a/end-search
     break-if->