From a4ee412e96e70f960850513da1c890e3da2cace6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 29 Apr 2014 16:59:07 -0700 Subject: [PATCH] Remove Math.max corrections to range Editor::getTextInBufferRange will clip the specified range instead. --- src/cursor.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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