CodeEditSourceEditor icon indicating copy to clipboard operation
CodeEditSourceEditor copied to clipboard

🐞 Cursor lags behind text insertion point

Open nkleemann opened this issue 6 months ago • 3 comments

Description

When editing documents with multiple layers of indention, sometimes the cursor doesn't move anymore, while the text gets inserted at the "correct" position.

This happens with the system cursor on or off.

To Reproduce

Edit a document with multiple levels of indention.

Expected Behavior

The cursor should always travel along.

Version Information

CodeEditSourceEditor: [0.12.0] macOS: [e.g. 15.4.1] Xcode: [e.g. 16.3]

Additional Context

No response

Screenshots

https://github.com/user-attachments/assets/4aca31c7-dfad-4033-8ba5-96f94423d3d6

nkleemann avatar May 14 '25 07:05 nkleemann

This may be due to the new Minimap view. Using instruments I can see it's taking up a lot of rendering time after a key is pressed.

thecoolwinter avatar May 27 '25 17:05 thecoolwinter

Oh I misunderstood this initially. I think this may have been fixed in v0.13.0.

thecoolwinter avatar Jun 02 '25 15:06 thecoolwinter

I just checked and the issue persists for files with over ~100 lines of code for me.

nkleemann avatar Jun 09 '25 12:06 nkleemann

You're right, I was able to reproduce this. It's an issue with our text view. Sometimes it doesn't do a layout pass after invalidating layout for a text line, so the cursor can't update it's position correctly. That makes it look like the cursor is lagging behind (cause it's never updated).

I should have a fix out in the next release of the text view.

thecoolwinter avatar Jun 19 '25 17:06 thecoolwinter

Just tested and couldn't reproduce anymore, thank you!

nkleemann avatar Jun 24 '25 18:06 nkleemann