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

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
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 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