CodeEditApp / CodeEditSourceEditor

A code editor view written in Swift powered by tree-sitter.
https://codeeditapp.github.io/CodeEditSourceEditor/documentation/codeeditsourceeditor
MIT License
534 stars 84 forks source link

🐞 Highlighter Fails to Invalidate New Text #235

Closed thecoolwinter closed 9 months ago

thecoolwinter commented 9 months ago

Description

The highlighter does not correctly invalidate text that has been inserted in a new file. This due to the highlighter not invalidating ranges that are not visible. However it should be able to invalidate all ranges that have been invalidated by tree-sitter, and only re-highlight any visible ranges.

To Reproduce

Expected Behavior

Any visible text should be able to be invalidated.

Version Information

CodeEditSourceEditor: 0.7.0 macOS: 14.3.1 Xcode: 15.2

Additional Context

No response

Screenshots

https://github.com/CodeEditApp/CodeEditSourceEditor/assets/35942988/b517aa66-7c03-47f4-90e6-8b68d18b5f2e

thecoolwinter commented 9 months ago

Closed with #238