Commit 23fa1bf
authored
Invalidate Correct Edited Range (#279)
### Description
In the highlight state, invalidates the correct range when performing an
edit.
Sometimes tree-sitter doesn't invalidate the ranges that were edited, so
we need to add that edited range in. This ensures that a non-empty range
is always invalidated.
### Related Issues
- Related pr: #273
### 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/user-attachments/assets/9e4d9b35-1e2d-44b8-9c2e-ffbfde69c8e4
Previously:
https://github.com/user-attachments/assets/4b572c31-0320-4f90-ac52-6f911713bc751 parent 21619c4 commit 23fa1bf
File tree
2 files changed
+7
-5
lines changed- Sources/CodeEditSourceEditor/Highlighting/HighlighProviding
- Tests/CodeEditSourceEditorTests/Highlighting
2 files changed
+7
-5
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
142 | 143 | | |
143 | | - | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
0 commit comments