From 92d91dc54dac02ea7f51260e9ce032f8632ad3e1 Mon Sep 17 00:00:00 2001 From: IllusionMan1212 Date: Tue, 25 Jan 2022 02:44:31 +0200 Subject: [PATCH] fix: only switch tabs when inputbox isn't focused --- ui/mainscreen/mainscreen.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/mainscreen/mainscreen.go b/ui/mainscreen/mainscreen.go index c2fad3d..a0a9d68 100644 --- a/ui/mainscreen/mainscreen.go +++ b/ui/mainscreen/mainscreen.go @@ -142,6 +142,11 @@ func (s State) Update(msg tea.Msg) (State, tea.Cmd) { return s, textinput.Blink case "right", "left": + // only cycle between tabs if focus isn't on the inputbox + if s.FocusIndex == InputBox { + break + } + // we need this so that the viewport doesnt scroll to the bottom if len(s.Client.Channels) == 1 { return s, nil