From 55cac9e7a9943f53e17a1d02eb8e39eafb59ce24 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 14 Aug 2021 15:39:14 -0700 Subject: slack: start building a cursor for the main pane First step: switch to arrow keys for navigating by item. --- browse-slack/environment.mu | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'browse-slack') diff --git a/browse-slack/environment.mu b/browse-slack/environment.mu index 05967c59..6479d5ff 100644 --- a/browse-slack/environment.mu +++ b/browse-slack/environment.mu @@ -335,10 +335,6 @@ fn render-main-menu screen: (addr screen), _env: (addr environment) { draw-text-rightward-from-cursor screen, " go to channels ", width, 0xf/fg, 0/bg draw-text-rightward-from-cursor screen, " ^b ", width, 0/fg 0xf/bg draw-text-rightward-from-cursor screen, " << page ", width, 0xf/fg, 0/bg - draw-text-rightward-from-cursor screen, " ^p ", width, 0/fg 0xf/bg - draw-text-rightward-from-cursor screen, " < item ", width, 0xf/fg, 0/bg - draw-text-rightward-from-cursor screen, " ^n ", width, 0/fg 0xf/bg - draw-text-rightward-from-cursor screen, " item > ", width, 0xf/fg, 0/bg draw-text-rightward-from-cursor screen, " ^f ", width, 0/fg 0xf/bg draw-text-rightward-from-cursor screen, " page >> ", width, 0xf/fg, 0/bg } @@ -716,13 +712,13 @@ fn update-environment _env: (addr environment), key: byte, users: (addr array us fn update-main-panel env: (addr environment), key: byte, users: (addr array user), channels: (addr array channel), items: (addr item-list) { { - compare key, 0xe/ctrl-n + compare key, 0x81/down-arrow break-if-!= next-item env, users, channels, items return } { - compare key, 0x10/ctrl-p + compare key, 0x82/up-arrow break-if-!= previous-item env, users, channels, items return -- cgit 1.4.1-2-gfad0