Add support for {n} in --with-nth and --accept-nth templates
Some checks are pending
CodeQL / Analyze (go) (push) Waiting to run
Test fzf on Linux / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run

Close #4275
This commit is contained in:
Junegunn Choi
2025-02-23 19:47:56 +09:00
parent bae1965231
commit 461115afde
5 changed files with 28 additions and 16 deletions

View File

@@ -128,7 +128,7 @@ func Run(opts *Options) (int, error) {
}
}
}
transformed := nthTransformer(tokens)
transformed := nthTransformer(tokens, itemIndex)
if len(header) < opts.HeaderLines {
header = append(header, transformed)
eventBox.Set(EvtHeader, header)