diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-24 18:40:13 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-02-24 18:40:13 +0900 |
| commit | e4489dcbc1e544ea15a9c89028ed29602ef7e941 (patch) | |
| tree | 8ccb1c18d8c9a7c8e53baa36bc9f09078ec378be /src/options.go | |
| parent | c0d407f7ce1c246c22fb786128c1f027ecd2b41e (diff) | |
| download | fzf-e4489dcbc1e544ea15a9c89028ed29602ef7e941.tar.gz | |
Fix regression: Trim trailing whitespaces when using --with-nth
https://github.com/junegunn/fzf/issues/4272#issuecomment-2677279620
Diffstat (limited to 'src/options.go')
| -rw-r--r-- | src/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/options.go b/src/options.go index 8a9e33ff..a526d3b7 100644 --- a/src/options.go +++ b/src/options.go @@ -778,7 +778,7 @@ func nthTransformer(str string) (func(Delimiter) func([]Token, int32) string, er } return func(Delimiter) func([]Token, int32) string { return func(tokens []Token, index int32) string { - return JoinTokens(Transform(tokens, nth)) + return strings.TrimRightFunc(JoinTokens(Transform(tokens, nth)), unicode.IsSpace) } }, nil } |
