From 29361ac54e9bf671ffb7d6ba7d3e816f5dc0c14c Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 13 Aug 2021 22:11:11 -0700 Subject: slack: more responsive typing --- browse-slack/environment.mu | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'browse-slack') diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu index da58c873..f7ae15e0 100644 --- a/browse-slack/environment.mu +++ b/browse-slack/environment.mu @@ -58,7 +58,16 @@ fn initialize-environment _self: (addr environment), _items: (addr item-list) { ### Render -fn render-environment screen: (addr screen), env: (addr environment), users: (addr array user), channels: (addr array channel), items: (addr item-list) { +fn render-environment screen: (addr screen), _env: (addr environment), users: (addr array user), channels: (addr array channel), items: (addr item-list) { + var env/esi: (addr environment) <- copy _env + # don't bother repainting the screen when typing into the search bar + { + var cursor-in-search?/eax: (addr boolean) <- get env, cursor-in-search? + compare *cursor-in-search?, 0/false + break-if-= + render-search-input screen, env + return + } clear-screen screen render-search-input screen, env render-channels screen, env, channels -- cgit 1.4.1-2-gfad0