Update line-map

This commit is contained in:
Garen Torikian
2013-05-01 16:36:56 -07:00
parent 46b5731ac4
commit 3dcdf0863e

View File

@@ -7,6 +7,8 @@ module.exports =
class LineMap
maxScreenLineLength: 0
### Internal ###
constructor: ->
@screenLines = []
@@ -28,6 +30,8 @@ class LineMap
for screenLine in maxLengthCandidates
@maxScreenLineLength = Math.max(@maxScreenLineLength, screenLine.text.length)
### Public ###
# Gets the line for the given screen row.
#
# screenRow - A {Number} indicating the screen row.
@@ -185,7 +189,8 @@ class LineMap
end = @bufferPositionForScreenPosition(screenRange.end)
new Range(start, end)
# Internal:
### Internal ###
logLines: (start=0, end=@screenLineCount() - 1)->
for row in [start..end]
line = @lineForScreenRow(row).text