chore(diffview): `TrimSuffix` -> `TrimRight`

Andrey Nering and Ayman Bagabas created

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>

Change summary

internal/tui/exp/diffview/chroma.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

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)