Skip to content

fix: code editor highlight load #201

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

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

MarcoCarnevali
Copy link
Collaborator

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):

  • I read and understood the contributing guide as well as the code of conduct
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • Review requested

@MarcoCarnevali MarcoCarnevali self-assigned this Mar 23, 2022
@MarcoCarnevali MarcoCarnevali linked an issue Mar 23, 2022 that may be closed by this pull request
@lukepistrol lukepistrol merged commit 6d70032 into CodeEditApp:main 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
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.

🐞 Text is dark in the dark mode
3 participants