From 2d313e07ff762573dedcb4d73f3cac8d8cf417cb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 2 Jul 2013 14:05:57 -0700 Subject: [PATCH] Clip position in characterIndexForPosition() --- src/app/text-buffer.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/text-buffer.coffee b/src/app/text-buffer.coffee index b2934d856..5c207f3cf 100644 --- a/src/app/text-buffer.coffee +++ b/src/app/text-buffer.coffee @@ -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)