mirror of
https://github.com/atom/atom.git
synced 2026-02-14 16:45:14 -05:00
Use buffer position when end of word isn't found
Previously if null was returned for the end of word position then it was interpreted as 0,0 which would select the entire contents before the current word instead of the current word.
This commit is contained in:
@@ -167,7 +167,7 @@ class Cursor
|
||||
if not allowNext and matchRange.start.isGreaterThan(currentBufferPosition)
|
||||
endOfWordPosition = currentBufferPosition
|
||||
stop()
|
||||
endOfWordPosition
|
||||
endOfWordPosition or currentBufferPosition
|
||||
|
||||
getCurrentWordBufferRange: ->
|
||||
new Range(@getBeginningOfCurrentWordBufferPosition(allowPrevious: false), @getEndOfCurrentWordBufferPosition(allowNext: false))
|
||||
|
||||
Reference in New Issue
Block a user