mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-29 22:48:24 +02:00
Default to substring filtering, add option to go back to fuzzy filtering
By default we now search for substrings; you can search for multiple substrings by separating them with spaces. Add a config option gui.filterMode that can be set to 'fuzzy' to switch back to the previous behavior.
This commit is contained in:
@@ -218,7 +218,7 @@ func (self *SearchHelper) OnPromptContentChanged(searchString string) {
|
||||
case types.IFilterableContext:
|
||||
context.SetSelection(0)
|
||||
_ = context.GetView().SetOriginY(0)
|
||||
context.SetFilter(searchString)
|
||||
context.SetFilter(searchString, self.c.UserConfig.Gui.UseFuzzySearch())
|
||||
_ = self.c.PostRefreshUpdate(context)
|
||||
case types.ISearchableContext:
|
||||
// do nothing
|
||||
@@ -234,7 +234,7 @@ func (self *SearchHelper) ReApplyFilter(context types.Context) {
|
||||
if ok {
|
||||
filterableContext.SetSelection(0)
|
||||
_ = filterableContext.GetView().SetOriginY(0)
|
||||
filterableContext.ReApplyFilter()
|
||||
filterableContext.ReApplyFilter(self.c.UserConfig.Gui.UseFuzzySearch())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user