fix: code editor highlight load#201
Merged
lukepistrol merged 1 commit intoCodeEditApp:mainfrom Mar 23, 2022
Merged
Conversation
3e94498 to
c2ed613
Compare
austincondiff
approved these changes
Mar 23, 2022
lukepistrol
approved these changes
Mar 23, 2022
xinix909
pushed a commit
to xinix909/CodeTransfer
that referenced
this pull request
Sep 7, 2024
### Description Bumps both `STTextView` and `TextFormation` to their latest versions. This version of `TextFormation` changes how whitespaces are handled by filters, so there were some small modifications that needed to be made to accommodate. This also slightly adjusts the `DeleteWhitespaceFilter` to match other editor's functionality. `DeleteWhitespaceFilter` now deletes only the leading whitespace, and only to the nearest column, instead of just a number of spaces. It will also jump to the rightmost side of the whitespace when deleting. The other half of this PR is an implementation for undo/redo. This adds a `CEUndoManager` (with the prefix b/c AppKit declares that type) class that implements an undo/redo stack and operation grouping. It provides methods for performing undo/redo operations, registering text mutations from the editor, grouping operations, and clearing the undo stack. The class also automatically groups certain mutations. See the class documentation for more info there. ### Related Issues * Closes CodeEditApp#201 * Closes CodeEditApp#203 ### 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/CodeEditTextView/assets/35942988/35c64ed6-590d-493a-8f91-d918fef363a5
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR should fix the CodeEditor loading issue we've seen. The issue in particular was that the code editor was loading the text without highlighting first resulting in a weird UI. This PR fixes that by manually highlight the text upon creating the view using a fast renderer solution. I've also added support to html syntax which for some reason wasn't added before.
Releated Issue
#144
Checklist (for drafts):