diff --git a/src/Source.hs b/src/Source.hs index 831bdf0c8..a2ea56b7c 100644 --- a/src/Source.hs +++ b/src/Source.hs @@ -121,7 +121,7 @@ rangeToSourceSpan :: Source -> Range -> SourceSpan rangeToSourceSpan source range = SourceSpan startPos endPos where startPos = maybe (SourcePos 1 1) (toStartPos 1) (head lineRanges) endPos = toEndPos (Prologue.length lineRanges) (fromMaybe (Range 0 0) (snd <$> unsnoc lineRanges)) - lineRanges = actualLineRanges (slice range source) + lineRanges = actualLineRangesWithin range source toStartPos line range = SourcePos line (succ (start range)) toEndPos line range = SourcePos line (succ (end range))