Skip to content

Syntax highlighting breaks for non-English text with file links, selection also behaves incorrectly #1857

Closed

Description

@dmitriyyan

When using non-English text (e.g., Russian) in chat messages containing file links, syntax highlighting breaks.
Additionally, text selection in such messages behaves incorrectly, highlighting is inconsistent and sometimes misaligned.

Steps to Reproduce

  1. Open the chat interface in opencode.
  2. Send a message in a non-English language (e.g., Russian) that includes a file link reference, for example:
    кратко в одну строку проанализируй @README.md
  3. Observe how syntax highlighting works compared to the same message in English.
  4. Try selecting the text in the broken-highlighted message.

Expected Behavior

  • Syntax highlighting should work consistently for all languages, including non-English text.
  • Text selection should behave normally and align with the actual characters.

Actual Behavior

  • Syntax highlighting breaks after the file link when using non-English text.
  • Text selection becomes misaligned or broken (see screenshots).

Screenshots

Image Image

Environment

  • opencode version: v0.4.2
  • GitHub Copilot: GPT-4.1 build agent
  • OS: macos 15.6
  • Terminal/Editor: ghostty, warp

Additional Context

This bug only appears with non-English text. English text with file links displays and selects correctly.


P.S. Fell in love with this software, thank you so much for what you’re doing ❤️

Activity

  1. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions