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 Visible Range, Responsive Language Update #238

Merged
merged 4 commits into from
Feb 29, 2024

Conversation

thecoolwinter
Copy link
Collaborator

Description

  • Updates the visible set of indices when text storage happens, fixing the linked issue.
  • When setting a new language on the highlighter, adds a small "reset" that clears all current highlights. This makes the language update feel snappier, as the user receives immediate feedback. Before the ts parser could take a few seconds to begin highlighting, so there would be a delay making it seem like the language update was not happening.
  • Adds a missing throw to the tree-sitter client that made edits always run synchronously (didn't feel big enough for a whole PR, found while debugging).
  • Only updates the font if the font is new, making text layouts occur much less frequently (also doesn't feel big enough for a separate PR)

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

CESE.-.visbleSet.-.Fixed.mov

@thecoolwinter thecoolwinter changed the title Invalidate Visible Range, Snappy Language Update Invalidate Visible Range, Responsive Language Update Feb 29, 2024
@thecoolwinter thecoolwinter merged commit a5581a2 into CodeEditApp:main Feb 29, 2024
2 checks passed
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.

2 participants