diff --git a/src/cursor.coffee b/src/cursor.coffee index 4e28f41cb..789cb1ba6 100644 --- a/src/cursor.coffee +++ b/src/cursor.coffee @@ -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