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 14:19:01 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-13 14:19:01 -0700
commita67cf4b248c3092b386762455d2aedbba3f4a695 (patch)
treed1d91f84f99424fe513ea71b6265f99b12e01d0a /browse-slack
parentf810852ed2ab6c4394cdca68df8dd6fb4344b319 (diff)
downloadmu-a67cf4b248c3092b386762455d2aedbba3f4a695.tar.gz
.
Diffstat (limited to 'browse-slack')
-rw-r--r--browse-slack/environment.mu18
-rw-r--r--browse-slack/main.mu2
2 files changed, 10 insertions, 10 deletions
diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu
index 5f192334..d3e2a804 100644
--- a/browse-slack/environment.mu
+++ b/browse-slack/environment.mu
@@ -491,34 +491,34 @@ fn render-json-escaped-unicode-grapheme screen: (addr screen), stream: (addr str
 
 ### Edit
 
-fn update-environment env: (addr environment), key: byte, items: (addr item-list) {
+fn update-environment env: (addr environment), key: byte, users: (addr array user), channels: (addr array channel), items: (addr item-list) {
   {
     compare key, 0xe/ctrl-n
     break-if-!=
-    next-item env, items
+    next-item env, users, channels, items
     return
   }
   {
     compare key, 0x10/ctrl-p
     break-if-!=
-    previous-item env, items
+    previous-item env, users, channels, items
     return
   }
   {
     compare key, 6/ctrl-f
     break-if-!=
-    page-down env, items
+    page-down env, users, channels, items
     return
   }
   {
     compare key, 2/ctrl-b
     break-if-!=
-    page-up env, items
+    page-up env, users, channels, items
     return
   }
 }
 
-fn next-item _env: (addr environment), _items: (addr item-list) {
+fn next-item _env: (addr environment), users: (addr array user), channels: (addr array channel), _items: (addr item-list) {
   var env/edi: (addr environment) <- copy _env
   var tabs-ah/eax: (addr handle array tab) <- get env, tabs
   var _tabs/eax: (addr array tab) <- lookup *tabs-ah
@@ -533,7 +533,7 @@ fn next-item _env: (addr environment), _items: (addr item-list) {
   decrement *dest
 }
 
-fn previous-item _env: (addr environment), _items: (addr item-list) {
+fn previous-item _env: (addr environment), users: (addr array user), channels: (addr array channel), _items: (addr item-list) {
   var env/edi: (addr environment) <- copy _env
   var items/esi: (addr item-list) <- copy _items
   var items-data-first-free-a/ecx: (addr int) <- get items, data-first-free
@@ -552,7 +552,7 @@ fn previous-item _env: (addr environment), _items: (addr item-list) {
   increment *dest
 }
 
-fn page-down _env: (addr environment), _items: (addr item-list) {
+fn page-down _env: (addr environment), users: (addr array user), channels: (addr array channel), _items: (addr item-list) {
   var env/edi: (addr environment) <- copy _env
   var items/esi: (addr item-list) <- copy _items
   var items-data-ah/eax: (addr handle array item) <- get items, data
@@ -600,7 +600,7 @@ fn page-down _env: (addr environment), _items: (addr item-list) {
   copy-to *current-tab-item-index-addr, new-item-index
 }
 
-fn page-up _env: (addr environment), _items: (addr item-list) {
+fn page-up _env: (addr environment), users: (addr array user), channels: (addr array channel), _items: (addr item-list) {
   var env/edi: (addr environment) <- copy _env
   var items/esi: (addr item-list) <- copy _items
   var items-data-ah/eax: (addr handle array item) <- get items, data
diff --git a/browse-slack/main.mu b/browse-slack/main.mu
index 5f8b43ed..5d9adecf 100644
--- a/browse-slack/main.mu
+++ b/browse-slack/main.mu
@@ -119,7 +119,7 @@ fn main screen: (addr screen), keyboard: (addr keyboard), data-disk: (addr disk)
       var key/eax: byte <- read-key keyboard
       compare key, 0
       loop-if-=
-      update-environment env, key, items
+      update-environment env, key, users, channels, items
     }
     loop
   }