mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Use position translation to calculate counts
This commit is contained in:
@@ -85,16 +85,10 @@ class LineMap
|
||||
line
|
||||
|
||||
bufferLineCount: ->
|
||||
delta = new Point
|
||||
for lineFragment in @lineFragments
|
||||
delta = delta.add(lineFragment.bufferDelta)
|
||||
delta.row
|
||||
@bufferPositionForScreenPosition([Infinity, 0]).row
|
||||
|
||||
screenLineCount: ->
|
||||
delta = new Point
|
||||
for lineFragment in @lineFragments
|
||||
delta = delta.add(lineFragment.screenDelta)
|
||||
delta.row
|
||||
@screenPositionForBufferPosition([Infinity, 0]).row
|
||||
|
||||
lastScreenRow: ->
|
||||
@screenLineCount() - 1
|
||||
|
||||
Reference in New Issue
Block a user