Clip position in characterIndexForPosition()

This commit is contained in:
Kevin Sawicki
2013-07-02 14:05:57 -07:00
parent 1efa480b4e
commit 2d313e07ff

View File

@@ -282,7 +282,7 @@ class TextBuffer
new Point(lastRow, @lineLengthForRow(lastRow))
characterIndexForPosition: (position) ->
@text.indexForPoint(position)
@text.indexForPoint(@clipPosition(position))
positionForCharacterIndex: (index) ->
@text.pointForIndex(index)