-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invalidate Visible Range, Responsive Language Update (#238)
### 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 * #235 ### Checklist - [x] I read and understood the [contributing guide](https://github.com/CodeEditApp/CodeEdit/blob/main/CONTRIBUTING.md) as well as the [code of conduct](https://github.com/CodeEditApp/CodeEdit/blob/main/CODE_OF_CONDUCT.md) - [x] The issues this PR addresses are related to each other - [x] My changes generate no new warnings - [x] My code builds and runs on my machine - [x] My changes are all related to the related issue above - [x] I documented my code ### Screenshots https://github.com/CodeEditApp/CodeEditSourceEditor/assets/35942988/e719178e-bc9a-4830-9ca5-8d113dcb9d8b
- Loading branch information
1 parent
63dcea1
commit a5581a2
Showing
3 changed files
with
21 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters