Remove Math.max corrections to range

Editor::getTextInBufferRange will clip the specified range instead.
This commit is contained in:
Kevin Sawicki
2014-04-29 16:59:07 -07:00
parent 4f655d7de5
commit a4ee412e96

View File

@@ -144,7 +144,7 @@ class Cursor extends Model
# Returns a {Boolean}.
isSurroundedByWhitespace: ->
{row, column} = @getBufferPosition()
range = [[row, Math.max(0, column - 1)], [row, Math.max(0, column + 1)]]
range = [[row, column - 1], [row, column + 1]]
/^\s+$/.test @editor.getTextInBufferRange(range)
# Public: Returns whether the cursor is currently between a word and non-word