Unified Agent + reusable Go agent core.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(clifmt): ensure diff background color fills entire line width

Chroma syntax highlighter may inject its own background colors (e.g.,
monokai style on # comments). The previous code only replaced \\x1b[0m
in the highlighted text, but if Chroma set a custom background that
wasn't followed by \\x1b[0m, the \\x1b[K sequence at line end would use
the wrong background.

Fix: re-apply the diff background color immediately before \\x1b[K so
the erase-to-EOL always uses the correct diff background.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

authored by

Teteuya
Claude Sonnet 4.6
and committed by
Lyric Wai
db5b8b7c 09afc765

+2
+2
internal/clifmt/diff.go
··· 297 297 b.WriteString(fmt.Sprintf("%s%*d%s - ", gray, gutterWidth, lineNum, fg)) 298 298 safeText := strings.ReplaceAll(text, "\x1b[0m", "\x1b[39m"+bg+fg) 299 299 b.WriteString(safeText) 300 + b.WriteString(bg) 300 301 b.WriteString("\x1b[K\x1b[0m") 301 302 } else { 302 303 b.WriteString(fmt.Sprintf("%*d - %s", gutterWidth, lineNum, text)) ··· 309 310 b.WriteString(fmt.Sprintf("%s%*d%s + ", gray, gutterWidth, lineNum, fg)) 310 311 safeText := strings.ReplaceAll(text, "\x1b[0m", "\x1b[39m"+bg+fg) 311 312 b.WriteString(safeText) 313 + b.WriteString(bg) 312 314 b.WriteString("\x1b[K\x1b[0m") 313 315 } else { 314 316 b.WriteString(fmt.Sprintf("%*d + %s", gutterWidth, lineNum, text))