mirror of
https://github.com/github/semantic.git
synced 2024-11-28 18:23:44 +03:00
Always drop the initial range.
This commit is contained in:
parent
d99be907d6
commit
a69366cf4b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user