Skip to content
Myr

Do not apply 'nth' attributes to trailing whitespaces

Before adoption: this commit came in with the history the project adopted, so no landing records it.

# foo bar # ----- <- previously underlined trailing whitespace # --- <- with the fix, trailing whitespace is excluded fzf --color nth:underline --nth 1 <<< 'foo bar'

authored by Junegunn Choi · committed by Junegunn Choi · parent c7ee3b8 · Browse files · 1 file+2 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−1 removed

  • other:+2 added−1 removed

1 file+2 added−1 removed

modified:src/terminal.go+2 added-1 removed
3042 unmodified lines
3043 tokens = Transform(Tokenize(item.text.ToString(), t.delimiter), t.nthCurrent)3044 }3045 for _, token := range tokens {3046 start := token.prefixLength3047 end := start + int32(token.text.Length())3047 length := token.text.Length() - token.text.TrailingWhitespaces()3048 end := start + int32(length)3049 nthOffsets = append(nthOffsets, Offset{int32(start), int32(end)})3050 }3051 sort.Sort(ByOrder(nthOffsets))3052 }
3364 unmodified lines