From bbf6371f87f16d8fb95c23b0103af853c8a8bc45 Mon Sep 17 00:00:00 2001 From: Joscha Date: Sun, 25 Sep 2022 22:50:45 +0200 Subject: [PATCH] Reorganize key bindings list a bit --- src/ui/chat/tree.rs | 6 +++--- src/ui/euph/room.rs | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ui/chat/tree.rs b/src/ui/chat/tree.rs index 91d939f..18942d4 100644 --- a/src/ui/chat/tree.rs +++ b/src/ui/chat/tree.rs @@ -160,9 +160,7 @@ impl> InnerTreeViewState { } pub fn list_edit_initiating_key_bindings(&self, bindings: &mut KeyBindingsList) { - bindings.empty(); - bindings.binding("r", "reply to message"); - bindings.binding_ctd("(inline if possible, otherwise directly)"); + bindings.binding("r", "reply to message (inline if possible, else directly)"); bindings.binding("R", "reply to message (opposite of R)"); bindings.binding("t", "start a new thread"); } @@ -197,8 +195,10 @@ impl> InnerTreeViewState { pub fn list_normal_key_bindings(&self, bindings: &mut KeyBindingsList, can_compose: bool) { self.list_movement_key_bindings(bindings); + bindings.empty(); self.list_action_key_bindings(bindings); if can_compose { + bindings.empty(); self.list_edit_initiating_key_bindings(bindings); } } diff --git a/src/ui/euph/room.rs b/src/ui/euph/room.rs index f89de09..671a8a7 100644 --- a/src/ui/euph/room.rs +++ b/src/ui/euph/room.rs @@ -497,7 +497,6 @@ impl EuphRoom { pub async fn list_normal_key_bindings(&self, bindings: &mut KeyBindingsList) { // Handled in rooms list, not here - // TODO Move to rooms list? bindings.binding("esc", "leave room"); let status = self.status().await; @@ -512,6 +511,8 @@ impl EuphRoom { } Focus::NickList => { bindings.binding("tab", "focus on chat"); + bindings.empty(); + bindings.heading("Nick list"); self.list_nick_list_focus_key_bindings(bindings); } }