mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Clip position in characterIndexForPosition()
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user