mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-06 22:33:07 +02:00
Fix visual regression when exiting filtering mode
When exiting filtering mode while the focus is not in the local commits panel,
the call to HandleFocus would render the selection in the commits panel as if
the panel had the focus.
The call to HandleFocus was introduced recently in 4981419ba9
in an attempt to
rerender the main view correctly, but it should only have been called when local
commits is the focused context. But instead, we can use PostRefreshUpdate, which
handles this distinction.
This commit is contained in:
@ -178,7 +178,8 @@ func (self *ModeHelper) ClearFiltering() error {
|
|||||||
// before we entered filtering
|
// before we entered filtering
|
||||||
self.c.Contexts().LocalCommits.SelectCommitByHash(self.c.Modes().Filtering.GetSelectedCommitHash())
|
self.c.Contexts().LocalCommits.SelectCommitByHash(self.c.Modes().Filtering.GetSelectedCommitHash())
|
||||||
}
|
}
|
||||||
self.c.Contexts().LocalCommits.HandleFocus(types.OnFocusOpts{})
|
|
||||||
|
self.c.PostRefreshUpdate(self.c.Contexts().LocalCommits)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
|
Reference in New Issue
Block a user