We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0996a5d commit cb352fbCopy full SHA for cb352fb
Sources/CodeEditSourceEditor/Highlighting/StyledRangeContainer/StyledRangeContainer.swift
@@ -96,6 +96,7 @@ class StyledRangeContainer {
96
var runs: [RangeStoreRun<StyleElement>] = []
97
98
var minValue = allRuns.compactMap { $0.last }.enumerated().min(by: { $0.1.length < $1.1.length })
99
+
100
while let value = minValue {
101
// Get minimum length off the end of each array
102
let minRunIdx = value.offset
@@ -117,9 +118,7 @@ class StyledRangeContainer {
117
118
}
119
120
- if !allRuns[minRunIdx].isEmpty {
121
- allRuns[minRunIdx].removeLast()
122
- }
+ allRuns[minRunIdx].removeLast()
123
124
runs.append(minRun)
125
minValue = allRuns.compactMap { $0.last }.enumerated().min(by: { $0.1.length < $1.1.length })
0 commit comments