From d2dc38ee87db564a1cac21d266c0c61d956853e0 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 21 Aug 2026 13:21:46 +0200 Subject: [PATCH] Drop the highlight fixups the context stack now makes unnecessary Two places nudged the flags because nothing else would: switching repos, where the view focused in the repo being left is not the one focused in the repo being entered, and tabbing from the suggestions list back to the prompt, which replaces the top of the stack rather than popping it, so the suggestions context never hears that it lost the focus. Both are just a context leaving the stack now. Co-authored-by: Claude Opus 5 (1M context) --- pkg/gui/controllers/suggestions_controller.go | 1 - pkg/gui/gui.go | 7 ------- 2 files changed, 8 deletions(-) diff --git a/pkg/gui/controllers/suggestions_controller.go b/pkg/gui/controllers/suggestions_controller.go index 0553050e5..18ee594b2 100644 --- a/pkg/gui/controllers/suggestions_controller.go +++ b/pkg/gui/controllers/suggestions_controller.go @@ -85,7 +85,6 @@ func (self *SuggestionsController) GetMouseKeybindings(opts types.KeybindingsOpt func (self *SuggestionsController) switchToPrompt() error { self.c.Views().Suggestions.Subtitle = "" - self.c.Views().Suggestions.Highlight = false self.c.Context().Replace(self.c.Contexts().Prompt) return nil } diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 4de37fec2..801fe14d3 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -598,13 +598,6 @@ func (gui *Gui) resetState(startArgs appTypes.StartArgs) types.Context { // RefreshHelper.onUIThreadUnlessRepoChanged). gui.repoGeneration.Add(1) - // Un-highlight the current view if there is one. The reason we do this is - // that the repo we are switching to might have a different view focused, - // and would then show an inactive highlight for the previous view. - if oldCurrentView := gui.g.CurrentView(); oldCurrentView != nil { - oldCurrentView.Highlight = false - } - worktreePath := gui.git.RepoPaths.WorktreePath() if state := gui.RepoStateMap[Repo(worktreePath)]; state != nil {