From c1c6e2fac24f8db618c8d895db272ca486b78300 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 2 Aug 2022 09:16:01 +1000 Subject: [PATCH] make exception for searching from menu --- pkg/gui/context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/gui/context.go b/pkg/gui/context.go index 89356d956..f08acec06 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -100,7 +100,8 @@ func (gui *Gui) pushContext(c types.Context, opts ...types.OnFocusOpts) error { // if top one is a temporary popup, we remove it. Ideally you'd be able to // escape back to previous temporary popups, but because we're currently reusing // views for this, you might not be able to get back to where you previously were. - if topContext.GetKind() == types.TEMPORARY_POPUP { + // The exception is when going to the search context e.g. for searching a menu. + if topContext.GetKind() == types.TEMPORARY_POPUP && c.GetKey() != context.SEARCH_CONTEXT_KEY { if err := gui.deactivateContext(topContext); err != nil { gui.State.ContextManager.Unlock() return err