Merge pull request #580 from nightwing/pullreq

python folding tests + some bugfix
This commit is contained in:
Fabian Jakobs 2011-12-16 03:01:35 -08:00
commit 512a82015f
8 changed files with 135 additions and 43 deletions

View file

@ -710,12 +710,23 @@ function Folding() {
var range = this.getFoldWidgetRange(row);
if (range) {
// sometimes singleline folds can be missed by the code above
if (!range.isMultiLine()) {
fold = this.getFoldAt(range.start.row, range.start.column, 1);
if (fold && range.isEequal(fold.range)) {
this.removeFold(fold);
return;
}
}
if (!onlySubfolds)
this.addFold("...", range);
if (addSubfolds)
this.foldAll(range.start.row + 1, range.end.row);
} else {
if (addSubfolds)
this.foldAll(row + 1, this.getLength());
e.target.className += " invalid"
}
};