mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-02-25 18:55:28 -06: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:
@@ -142,6 +142,13 @@ type GuiConfig struct {
|
||||
// Whether to stack UI components on top of each other.
|
||||
// One of 'auto' (default) | 'always' | 'never'
|
||||
PortraitMode string `yaml:"portraitMode"`
|
||||
// How things are filtered when typing '/'.
|
||||
// One of 'substring' (default) | 'fuzzy'
|
||||
FilterMode string `yaml:"filterMode" jsonschema:"enum=substring,enum=fuzzy"`
|
||||
}
|
||||
|
||||
func (c *GuiConfig) UseFuzzySearch() bool {
|
||||
return c.FilterMode == "fuzzy"
|
||||
}
|
||||
|
||||
type ThemeConfig struct {
|
||||
@@ -660,6 +667,7 @@ func GetDefaultConfig() *UserConfig {
|
||||
Border: "rounded",
|
||||
AnimateExplosion: true,
|
||||
PortraitMode: "auto",
|
||||
FilterMode: "substring",
|
||||
},
|
||||
Git: GitConfig{
|
||||
Paging: PagingConfig{
|
||||
|
||||
Reference in New Issue
Block a user