File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Sources/SourceKitLSP/Swift Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ struct SyntaxHighlightingTokenParser {
206
206
}
207
207
}
208
208
209
- extension Range where Bound == Position {
209
+ extension Range < Position > {
210
210
/// Splits a potentially multi-line range to multiple single-line ranges.
211
211
func splitToSingleLineRanges( in snapshot: DocumentSnapshot ) -> [ Self ] {
212
212
if isEmpty {
@@ -220,7 +220,8 @@ extension Range where Bound == Position {
220
220
guard let startIndex = snapshot. index ( of: lowerBound) ,
221
221
let endIndex = snapshot. index ( of: upperBound)
222
222
else {
223
- fatalError ( " Range \( self ) reaches outside of the document " )
223
+ logger. fault ( " Range \( self ) reaches outside of the document " )
224
+ return [ self ]
224
225
}
225
226
226
227
let text = snapshot. text [ startIndex..< endIndex]
You can’t perform that action at this time.
0 commit comments