Commit 1beac47
authored
Fix StyledRangeStore Crash (#303)
### Description
Fixes a potential crash with the styled range store. This is caused by a
race condition where the store hasn't been notified of a content length
change, but has been given new data to put in the (valid) range. This
only happens when content is appended to the end of a document and comes
into view at the same time. This is fixed by simply appending the
missing range when updating the style storage object.
### Related Issues
N/A
### Checklist
<!--- Add things that are not yet implemented above -->
- [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
N/A1 parent f444927 commit 1beac47
File tree
1 file changed
+7
-0
lines changed- Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeStore
1 file changed
+7
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
| |||
0 commit comments