doubleclick on whitespace must select only whitespace

This commit is contained in:
nightwing 2012-06-01 18:24:57 +04:00
commit 2ffe3726ce

View file

@ -708,15 +708,18 @@ var EditSession = function(text, mode) {
var line = this.getLine(row);
var inToken = false;
if (column > 0) {
if (column > 0)
inToken = !!line.charAt(column - 1).match(this.tokenRe);
}
if (!inToken) {
if (!inToken)
inToken = !!line.charAt(column).match(this.tokenRe);
}
var re = inToken ? this.tokenRe : this.nonTokenRe;
if (inToken)
var re = this.tokenRe;
else if (/^\s+$/.test(line.slice(column-1, column+1)))
var re = /\s/;
else
var re = this.nonTokenRe;
var start = column;
if (start > 0) {