From cfb746e66a97085e2b68a36559074c0d8abc4add Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 9 Mar 2021 13:24:24 +0100 Subject: [PATCH] Pass through all keys when editing filter --- ui/ui.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/ui.go b/ui/ui.go index 08df524..f0a916c 100644 --- a/ui/ui.go +++ b/ui/ui.go @@ -254,6 +254,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Send q/esc through to stash switch m.state { case stateShowStash: + // pass through all keys if we're editing the filter + if m.stash.filterState == filtering { + m.stash, cmd = m.stash.update(msg) + return m, cmd + } // Q quits if we're filtering, but we still send esc though. if m.stash.filterApplied() { @@ -267,7 +272,6 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { // Send q/esc through in these cases switch m.stash.viewState { case stashStateReady: - // Q also quits glow when displaying only newsitems. Esc // still passes through. if msg.String() == "q" {