Clip buffer position in screenPositionForBufferPosition()

Closes #562
This commit is contained in:
Kevin Sawicki
2013-05-22 15:23:30 -07:00
parent 1dc49cfc70
commit d3cbd937fb
2 changed files with 8 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ class DisplayBuffer
#
# Returns a {Point}.
screenPositionForBufferPosition: (bufferPosition, options) ->
{ row, column } = Point.fromObject(bufferPosition)
{ row, column } = @buffer.clipPosition(bufferPosition)
[startScreenRow, endScreenRow] = @rowMap.screenRowRangeForBufferRow(row)
for screenRow in [startScreenRow...endScreenRow]
screenLine = @screenLines[screenRow]