mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Update line-map
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user