mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Select all adjacent whitespace on double click
Cursor::isSurroundedByWhitespace was use column 0 instead of the position right before the cursor.
This commit is contained in:
@@ -144,7 +144,7 @@ class Cursor extends Model
|
||||
# Returns a {Boolean}.
|
||||
isSurroundedByWhitespace: ->
|
||||
{row, column} = @getBufferPosition()
|
||||
range = [[row, Math.min(0, column - 1)], [row, Math.max(0, column + 1)]]
|
||||
range = [[row, Math.max(0, column - 1)], [row, Math.max(0, 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