This commit is contained in:
Fabian Jakobs 2011-12-09 16:45:19 +01:00
commit e1b21b0dc8
43 changed files with 71 additions and 53 deletions

View file

@ -9917,7 +9917,7 @@ function Folding() {
token = iterator.stepBackward();
range.end.row = iterator.getCurrentTokenRow();
range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 1;
range.end.column = iterator.getCurrentTokenColumn() + token.value.length;
return range;
}
};
@ -10479,8 +10479,10 @@ var TokenIterator = function(session, initialRow, initialColumn) {
while (this.$tokenIndex < 0) {
this.$row -= 1;
if (this.$row < 0)
if (this.$row < 0) {
this.$row = 0;
return null;
}
this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
this.$tokenIndex = this.$rowTokens.length - 1;
@ -10495,8 +10497,10 @@ var TokenIterator = function(session, initialRow, initialColumn) {
while (this.$tokenIndex >= this.$rowTokens.length) {
this.$row += 1;
if (this.$row >= rowCount)
if (this.$row >= rowCount) {
this.$row = rowCount - 1;
return null;
}
this.$rowTokens = this.$session.getTokens(this.$row, this.$row)[0].tokens;
this.$tokenIndex = 0;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long