Renderer.expandBufferRangeToLineEnds and Renderer.expandScreenRangeToLineEnds use Range.fromObject

This commit is contained in:
Corey Johnson 2012-04-16 14:57:01 -07:00
parent 54f7212ad8
commit 5e2e550217

View File

@ -216,10 +216,12 @@ class Renderer
@expandBufferRangeToLineEnds(bufferRange)))
expandScreenRangeToLineEnds: (screenRange) ->
screenRange = Range.fromObject(screenRange)
{ start, end } = screenRange
new Range([start.row, 0], [end.row, @lineMap.lineForScreenRow(end.row).text.length])
expandBufferRangeToLineEnds: (bufferRange) ->
bufferRange = Range.fromObject(bufferRange)
{ start, end } = bufferRange
new Range([start.row, 0], [end.row, Infinity])