chore: refactor diff

This commit is contained in:
adamdottv 2025-05-12 15:17:50 -05:00
parent e3eb9e5435
commit 0117c72a2c
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 106 additions and 2 deletions

View file

@ -648,8 +648,9 @@ func applyHighlighting(content string, segments []Segment, segmentType LineType,
r, g, b, _ = bgColor.RGBA()
sb.WriteString(fmt.Sprintf("%d;%d;%dm", r>>8, g>>8, b>>8))
sb.WriteString(char)
// Reset foreground and background
sb.WriteString("\x1b[39m")
// Full reset of all attributes to ensure clean state
sb.WriteString("\x1b[0m")
// Reapply the original ANSI sequence
sb.WriteString(currentStyle)