Merge remote branch 'upstream/master'

This commit is contained in:
dgeorge 2011-10-31 16:10:40 -07:00
commit 81411db28a
2 changed files with 8 additions and 2 deletions

View file

@ -1209,10 +1209,11 @@ var EditSession = function(text, mode) {
while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
split --;
}
while (split > minSplit && tokens[split] == PUNCTUATION) {
split --;
}
// If we found one, then add the split.
if (split > minSplit) {
while(split > minSplit && tokens[split] == PUNCTUATION)
split --;
addSplit(++split);
continue;
}

View file

@ -390,6 +390,11 @@ module.exports = {
computeAndAssert(" ぁぁ", [1, 2], 2);
computeAndAssert(" ぁ\tぁ", [1, 3], 2);
computeAndAssert(" ぁぁ\tぁ", [1, 4], 4);
// Test wrapping for punctuation.
computeAndAssert(" ab.c;ef++", [1, 3, 5, 7, 8], 2);
computeAndAssert(" a.b", [1, 2, 3], 1);
computeAndAssert("#>>", [1, 2], 1);
},
"test get longest line" : function() {