diff options
| author | adamdottv <[email protected]> | 2025-05-12 15:17:50 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-12 15:17:50 -0500 |
| commit | 0117c72a2c3f5a91516d5d8158560637b4a16a4c (patch) | |
| tree | 4878ea0220ea34ef3d2efafe82175cdd63a83e4b /internal/diff/diff.go | |
| parent | e3eb9e5435a3b0f805dba076c4d5940a4318ea4f (diff) | |
| download | opencode-0117c72a2c3f5a91516d5d8158560637b4a16a4c.tar.gz opencode-0117c72a2c3f5a91516d5d8158560637b4a16a4c.zip | |
chore: refactor diff
Diffstat (limited to 'internal/diff/diff.go')
| -rw-r--r-- | internal/diff/diff.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/diff/diff.go b/internal/diff/diff.go index 3f8856668..538960c53 100644 --- a/internal/diff/diff.go +++ b/internal/diff/diff.go @@ -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) |
