Merge pull request #16075 from atom/fix-select-word

Fix select-word command between word and non-word chararacters
This commit is contained in:
Nathan Sobo
2017-11-02 14:41:39 -06:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -594,7 +594,7 @@ class Cursor extends Model {
getCurrentWordBufferRange (options = {}) {
const position = this.getBufferPosition()
const ranges = this.editor.buffer.findAllInRangeSync(
options.wordRegex || this.wordRegExp(),
options.wordRegex || this.wordRegExp(options),
new Range(new Point(position.row, 0), new Point(position.row, Infinity))
)
const range = ranges.find(range =>