mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Remove Math.max corrections to range
Editor::getTextInBufferRange will clip the specified range instead.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user