mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
Add FuzzyLongestSort flag
This commit is contained in:
parent
3af95d6d07
commit
1e185a785f
|
|
@ -104,6 +104,7 @@ type Peco struct {
|
|||
skipReadConfig bool
|
||||
styles StyleSet
|
||||
use256Color bool
|
||||
fuzzyLongestSort bool
|
||||
|
||||
// Source is where we buffer input. It gets reused when a new query is
|
||||
// executed.
|
||||
|
|
@ -299,6 +300,7 @@ type Config struct {
|
|||
QueryExecutionDelay int
|
||||
StickySelection bool
|
||||
MaxScanBufferSize int
|
||||
FuzzyLongestSort bool
|
||||
|
||||
// If this is true, then the prefix for single key jump mode
|
||||
// is displayed by default.
|
||||
|
|
|
|||
1
peco.go
1
peco.go
|
|
@ -568,6 +568,7 @@ func (p *Peco) ApplyConfig(opts CLIOptions) error {
|
|||
if len(p.initialFilter) <= 0 {
|
||||
p.initialFilter = opts.OptInitialMatcher
|
||||
}
|
||||
p.fuzzyLongestSort = p.config.FuzzyLongestSort
|
||||
|
||||
if err := p.populateFilters(); err != nil {
|
||||
return errors.Wrap(err, "failed to populate filters")
|
||||
|
|
|
|||
Loading…
Reference in a new issue