CodeEditSourceEditor
CodeEditSourceEditor copied to clipboard
🐞 Cursor lags behind text insertion point
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
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.
Oh I misunderstood this initially. I think this may have been fixed in v0.13.0.
I just checked and the issue persists for files with over ~100 lines of code for me.
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.
Just tested and couldn't reproduce anymore, thank you!