1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

Always drop the initial range.

This commit is contained in:
Rob Rix 2015-12-21 20:21:55 -05:00
parent d99be907d6
commit a69366cf4b

View File

@ -299,5 +299,5 @@ actualLines lines = case break (== '\n') lines of
-- | Compute the line ranges within a given range of a string.
actualLineRanges :: Range -> String -> [Range]
actualLineRanges range = scanl toRange (Range (start range) (start range)) . actualLines . substring range
actualLineRanges range = drop 1 . scanl toRange (Range (start range) (start range)) . actualLines . substring range
where toRange previous string = Range (end previous) $ end previous + length string