Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Editor Focus, Undo/Redo, Speed Up Cursor Labels #1515

Merged
merged 2 commits into from
Dec 23, 2023

Conversation

thecoolwinter
Copy link
Collaborator

@thecoolwinter thecoolwinter commented Dec 23, 2023

Description

  • Updates CETV to fix two bugs:
    • The editor did not return the correct view from hitTest, resulting in the editor not being able to receive firstResponder status.
    • The editor would not tell a new undo manager about itself, resulting in an undo manager that could not record undo/redo actions.
  • Refactors @austincondiff's cursor labels to use the new TextViewCoordinator API to efficiently get the number of lines in ranges in the cursor label. The complexity of the calculation is no longer tied linearly to length (O(log n)).

Related Issues

N/A

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

Finding the number of lines in a selection is instantaneous for any number of lines:

Screen.Recording.2023-12-22.at.8.42.03.PM.mov

@thecoolwinter thecoolwinter added the bug Something isn't working label Dec 23, 2023
@bombardier200 bombardier200 merged commit 63e4fa2 into CodeEditApp:main Dec 23, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants