Fix #344 - Backward scan when --tiebreak=end

This commit is contained in:
Junegunn Choi
2015-09-12 11:37:55 +09:00
parent 9017e29741
commit 64443221aa
6 changed files with 112 additions and 58 deletions

View File

@@ -143,7 +143,8 @@ func Run(opts *Options) {
// Matcher
patternBuilder := func(runes []rune) *Pattern {
return BuildPattern(
opts.Mode, opts.Case, opts.Nth, opts.Delimiter, runes)
opts.Mode, opts.Case, opts.Tiebreak != byEnd,
opts.Nth, opts.Delimiter, runes)
}
matcher := NewMatcher(patternBuilder, sort, opts.Tac, eventBox)