diff --git a/internal/tui/exp/diffview/chroma.go b/internal/tui/exp/diffview/chroma.go index 01f1f7093a649e0dd0f93e6aa36f56e2faa9f4e1..72e286c6cbab0a2080bcb54043083bf253171158 100644 --- a/internal/tui/exp/diffview/chroma.go +++ b/internal/tui/exp/diffview/chroma.go @@ -22,7 +22,7 @@ type chromaFormatter struct { // Format implements the chroma.Formatter interface. func (c chromaFormatter) Format(w io.Writer, style *chroma.Style, it chroma.Iterator) error { for token := it(); token != chroma.EOF; token = it() { - value := strings.TrimSuffix(token.Value, "\n") + value := strings.TrimRight(token.Value, "\n") value = ansiext.Escape(value) entry := style.Get(token.Type)