diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2016-01-13 21:36:44 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-01-14 01:12:49 +0900 |
| commit | 8d3a302a1754a4e28cc1085b95e9a03981372d02 (patch) | |
| tree | a5b95363609d3acebda69890fd6b7b59b18f9c02 /src/options.go | |
| parent | 1d2d32c847e39818bedae5f86ca75e6b70b60444 (diff) | |
| download | fzf-8d3a302a1754a4e28cc1085b95e9a03981372d02.tar.gz | |
Simplify Item structure
This commit compensates for the performance overhead from the
extended tiebreak option.
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/options.go b/src/options.go index 30e00160..6399343c 100644 --- a/src/options.go +++ b/src/options.go @@ -83,7 +83,6 @@ const ( byLength byBegin byEnd - byIndex ) func defaultMargin() [4]string { @@ -147,7 +146,7 @@ func defaultOptions() *Options { Delimiter: Delimiter{}, Sort: 1000, Tac: false, - Criteria: []criterion{byMatchLen, byLength, byIndex}, + Criteria: []criterion{byMatchLen, byLength}, Multi: false, Ansi: false, Mouse: true, @@ -382,7 +381,6 @@ func parseTiebreak(str string) []criterion { switch str { case "index": check(&hasIndex, "index") - criteria = append(criteria, byIndex) case "length": check(&hasLength, "length") criteria = append(criteria, byLength) @@ -396,9 +394,6 @@ func parseTiebreak(str string) []criterion { errorExit("invalid sort criterion: " + str) } } - if !hasIndex { - criteria = append(criteria, byIndex) - } return criteria } |
