Skip to content

Conversation

@thecoolwinter
Copy link
Contributor

Description

Addresses an issue described by @nkleemann in the linked issue. The issue was a bug where cursors would lag behind an edit. This is due to the edited line's layout information being invalidated by the edit, meaning the selection manager cannot get valid layout information to position cursors.

This change puts a selection position update in the text view's layout call, after the layout manager has done it's layout pass. This ensures the selection manage is using valid layout information, fixing the lagging issue.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

On v0.11.2:

Screen.Recording.2025-06-19.at.12.30.54.PM.mov

With this change:

Screen.Recording.2025-06-19.at.12.29.37.PM.mov

@thecoolwinter thecoolwinter merged commit 48cef38 into CodeEditApp:main Jun 19, 2025
2 checks passed
@thecoolwinter thecoolwinter deleted the fix/cursor-lags-behind-editing branch June 19, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant