Skip to content

fix: properly handle utf-8 in diff highlighting#585

Merged
adamdotdevin merged 1 commit into
anomalyco:devfrom
levabala:tui-diff-highlighting-fix-utf8
Jul 3, 2025
Merged

fix: properly handle utf-8 in diff highlighting#585
adamdotdevin merged 1 commit into
anomalyco:devfrom
levabala:tui-diff-highlighting-fix-utf8

Conversation

@levabala

@levabala levabala commented Jul 1, 2025

Copy link
Copy Markdown
Contributor

fixes #379

seems like the problem was in applyHighlighting in diff.go
https://github.com/sst/opencode/blob/e99bdcefac44db9251ac08b515a6b1f5af42610c/packages/tui/internal/components/diff/diff.go#L607

the incrementing didn't honor multi-byte UTF-8 characters

i don't quite understand the code, but the solution seems to be working

@adamdotdevin adamdotdevin self-assigned this Jul 2, 2025
@adamdotdevin
adamdotdevin merged commit 2ace574 into anomalyco:dev Jul 3, 2025
achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cyrillic characters are not displayed correctly in diff view

2 participants