[BUG] Prompt editor cursor character parsing breaks when hovering over highlighted "think" text
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I hover the mouse cursor over highlighted text (see screenshots) the editor/UI "breaks" caret/selection and/or layout becomes incorrect.
The issue happens only when the cursor is moved over the highlighted word (the screenshots label the states).
Over highlighted text
<img width="1002" height="104" alt="Image" src="https://github.com/user-attachments/assets/ad619bb3-da24-43bf-a7a0-02a4f2a81442" />
Everywhere else
<img width="724" height="122" alt="Image" src="https://github.com/user-attachments/assets/140a3d2c-ab6c-4230-99f2-0612eb7c6687" />
Reproduction steps (as observed)
Open the editor/view that supports highlighted text (the screenshots show the UI).
Locate a highlighted word — in my test the word is think.
Move the mouse cursor over the highlighted text.
Observe that the editor "breaks" (cursor/selection behavior and/or rendering changes unexpectedly).
What Should Happen?
Hovering over highlighted text should not break, caret position, selection, or cause rendering glitches. The highlight should remain stable and the cursor should behave normally as it's on non highlighted text.
Error Messages/Logs
Steps to Reproduce
- Open the editor/view that supports highlighted text (the screenshots show the UI).
- Locate a highlighted word in my test the word is think.
- Move the mouse cursor over the highlighted text.
- Observe that the editor "breaks" (cursor/selection behavior and/or rendering changes unexpectedly).
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.128 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
I am currently using Claude Code in yolo mode on the Ghostty terminal on macOS.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗