From 5c9f168b7f1fe62e352b7fc70aa48ac5f14c31a3 Mon Sep 17 00:00:00 2001 From: Andrey Nering Date: Wed, 23 Jul 2025 15:38:28 -0300 Subject: [PATCH] chore(diffview): `TrimSuffix` -> `TrimRight` Co-authored-by: Ayman Bagabas --- internal/tui/exp/diffview/chroma.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)