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

Invalidate Correct Edited Range #279

Merged

Conversation

thecoolwinter
Copy link
Collaborator

Description

In the highlight state, invalidates the correct range when performing an edit.

Sometimes tree-sitter doesn't invalidate the ranges that were edited, so we need to add that edited range in. This ensures that a non-empty range is always invalidated.

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

Screen.Recording.2024-11-20.at.10.35.57.PM.mov

Previously:

Screen.Recording.2024-11-20.at.10.36.57.PM.mov

@thecoolwinter thecoolwinter added the bug Something isn't working label Nov 21, 2024
austincondiff
austincondiff previously approved these changes Nov 21, 2024
@austincondiff
Copy link
Collaborator

Fix the failed test first and then we can merge.

Copy link
Collaborator

@0xWDG 0xWDG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@thecoolwinter
Copy link
Collaborator Author

Fix the failed test first and then we can merge.

Fixed! Had to update a test for that method that used different range/delta semantics than NSTextStorage

@thecoolwinter thecoolwinter merged commit 23fa1bf into CodeEditApp:main Nov 21, 2024
2 checks passed
@thecoolwinter thecoolwinter deleted the fix/edited-range-excluded branch November 21, 2024 16:04
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