[BUG] Prompt editor cursor character parsing breaks when hovering over highlighted "think" text

Resolved 💬 3 comments Opened Sep 29, 2025 by priyanshujain Closed Oct 1, 2025

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

  1. Open the editor/view that supports highlighted text (the screenshots show the UI).
  2. Locate a highlighted word in my test the word is think.
  3. Move the mouse cursor over the highlighted text.
  4. 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.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗