LineWrapper translates positions correctly with respect to folding.

This commit is contained in:
Nathan Sobo
2012-02-24 14:20:06 -07:00
parent 63be776837
commit b8ef7685de
2 changed files with 16 additions and 3 deletions

View File

@@ -80,10 +80,13 @@ class LineWrapper
@lineMap.screenRangeForBufferRange(bufferRange)
screenPositionForBufferPosition: (bufferPosition, eagerWrap=true) ->
@lineMap.screenPositionForBufferPosition(bufferPosition, eagerWrap)
@lineMap.screenPositionForBufferPosition(
@lineFolder.screenPositionForBufferPosition(bufferPosition),
eagerWrap)
bufferPositionForScreenPosition: (screenPosition) ->
@lineMap.bufferPositionForScreenPosition(screenPosition)
@lineFolder.bufferPositionForScreenPosition(
@lineMap.bufferPositionForScreenPosition(screenPosition))
lineForScreenRow: (screenRow) ->
@linesForScreenRows(screenRow, screenRow)[0]