mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-30 10:05:58 +00:00
Fix --header-lines unaffected by --with-nth
This commit is contained in:
1 parent
928fccc15b
commit
4e0e03403e
3 files changed
+22
-6
No files matched your search
+3
-3
@@ -104,13 +104,13 @@ func Run(opts *Options) {
|
||||
})
|
||||
} else {
|
||||
chunkList = NewChunkList(func(data *string, index int) *Item {
|
||||
tokens := Tokenize(data, opts.Delimiter)
|
||||
trans := Transform(tokens, opts.WithNth)
|
||||
if len(header) < opts.HeaderLines {
|
||||
header = append(header, *data)
|
||||
header = append(header, *joinTokens(trans))
|
||||
eventBox.Set(EvtHeader, header)
|
||||
return nil
|
||||
}
|
||||
tokens := Tokenize(data, opts.Delimiter)
|
||||
trans := Transform(tokens, opts.WithNth)
|
||||
item := Item{
|
||||
text: joinTokens(trans),
|
||||
origText: data,
|
||||
|
||||
Reference in new issue
Block a user