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.
2 parents 7db1e66 + 098e648 commit aeead60Copy full SHA for aeead60
Sources/CodeEditSourceEditor/Highlighting/HighlighProviding/HighlightProviderState.swift
@@ -191,8 +191,13 @@ private extension HighlightProviderState {
191
highlights: highlights,
192
rangeToHighlight: range
193
)
194
- case .failure:
195
- self?.invalidate(IndexSet(integersIn: range))
+ case .failure(let error):
+ // Only invalidate if it was cancelled.
196
+ if let error = error as? HighlightProvidingError, error == .operationCancelled {
197
+ self?.invalidate(IndexSet(integersIn: range))
198
+ } else {
199
+ self?.logger.debug("Highlighter Error: \(error.localizedDescription)")
200
+ }
201
}
202
203
0 commit comments