mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 05:28:16 +00:00
chore: refactor diff
This commit is contained in:
parent
e3eb9e5435
commit
0117c72a2c
2 changed files with 106 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue