Bug: Cursor blinks in the wrong place when editing code

Title:

Bug: Cursor blinks in the wrong place when editing code


Post Content:

Hi everyone,

I’ve been experiencing a strange issue in Cursor and wanted to check if others have run into the same thing — or if there’s a fix I might have missed.


:magic_wand: What’s happening:

When I click at the end of a line in a code file — for example, a CSS rule or a JSON object — the blinking cursor doesn’t show up at the end. Instead, it blinks somewhere earlier in the line, often in the middle.

But here’s the strange part:
If I type something, the new character gets inserted at the correct place — the actual end of the line, not where the cursor is blinking.


:repeat_button: I’ve tested this in different files:

  • CSS (font-family: "Segoe UI", ...)
  • JSON (with quoted keys/values)
  • HTML (inside attribute values)

The issue happens in all of them — especially on lines that have quoted strings, commas, and spaces. I’ve attached screenshots to show what I mean.


:magnifying_glass_tilted_left: What I’ve already tried:

  • Disabled all extensions → no change
  • Changed the font to "Courier New" and turned off ligatures
  • Zoomed in/out to force a layout refresh
  • Opened DevTools to inspect the cursor element — the logic is correct, but the visual position is off

:light_bulb: Example:

In a line like this:

font-family: "Segoe UI", Tahoma, Geneva, sans-serif;

I click after the semicolon, but the blinking cursor appears somewhere around "Segoe UI" instead.
Still, when I type a letter like P, it gets inserted correctly at the end.

image


:red_question_mark:Has anyone else run into this?

Is this a known issue? Could it be related to my theme or rendering settings?

Thanks in advance — and let me know if you need more details or logs! I’d love to get this fixed since it makes editing feel confusing when the cursor doesn’t reflect where I’m actually typing.