mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-07 23:52:04 -07:00
Nullify --nth option when it's irrelevant
This commit is contained in:
@@ -266,6 +266,17 @@ func parseOptions(opts *Options, allArgs []string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we're not using extended search mode, --nth option becomes irrelevant
|
||||
// if it contains the whole range
|
||||
if opts.Mode == ModeFuzzy || len(opts.Nth) == 1 {
|
||||
for _, r := range opts.Nth {
|
||||
if r.begin == rangeEllipsis && r.end == rangeEllipsis {
|
||||
opts.Nth = make([]Range, 0)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ParseOptions parses command-line options
|
||||
|
Reference in New Issue
Block a user