mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
Always reapply filters on filtered views, even inactive ones
This commit is contained in:
parent
c6df856079
commit
e205c6ba7f
2 changed files with 5 additions and 7 deletions
|
@ -239,14 +239,14 @@ func (self *SearchHelper) OnPromptContentChanged(searchString string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (self *SearchHelper) ReApplyFilter(context types.Context) {
|
func (self *SearchHelper) ReApplyFilter(context types.Context) {
|
||||||
state := self.searchState()
|
filterableContext, ok := context.(types.IFilterableContext)
|
||||||
if context == state.Context {
|
if ok {
|
||||||
filterableContext, ok := context.(types.IFilterableContext)
|
state := self.searchState()
|
||||||
if ok {
|
if context == state.Context {
|
||||||
filterableContext.SetSelection(0)
|
filterableContext.SetSelection(0)
|
||||||
_ = filterableContext.GetView().SetOriginY(0)
|
_ = filterableContext.GetView().SetOriginY(0)
|
||||||
filterableContext.ReApplyFilter(self.c.UserConfig.Gui.UseFuzzySearch())
|
|
||||||
}
|
}
|
||||||
|
filterableContext.ReApplyFilter(self.c.UserConfig.Gui.UseFuzzySearch())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,7 @@ var FilterUpdatesWhenModelChanges = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
t.Views().Branches().
|
t.Views().Branches().
|
||||||
Lines(
|
Lines(
|
||||||
Contains("checked-out-branch").IsSelected(),
|
Contains("checked-out-branch").IsSelected(),
|
||||||
/* EXPECTED:
|
|
||||||
Contains("new-branch"),
|
Contains("new-branch"),
|
||||||
*/
|
|
||||||
)
|
)
|
||||||
|
|
||||||
t.Views().Branches().
|
t.Views().Branches().
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue