From c07731a98dc2bd4b47287873b99157533800a348 Mon Sep 17 00:00:00 2001 From: cyberme0w Date: Fri, 1 Mar 2024 08:10:44 +0000 Subject: [PATCH] Only allow focus on guilds tree if it exists (#350) --- cmd/main_flex.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/main_flex.go b/cmd/main_flex.go index 26ad881..70fa807 100644 --- a/cmd/main_flex.go +++ b/cmd/main_flex.go @@ -57,7 +57,9 @@ func (mf *MainFlex) onInputCapture(event *tcell.EventKey) *tcell.EventKey { return nil case cfg.Keys.GuildsTree.Focus: - app.SetFocus(mf.guildsTree) + if mf.GetItemCount() == 2 { + app.SetFocus(mf.guildsTree) + } return nil case cfg.Keys.MessagesText.Focus: app.SetFocus(mf.messagesText)