handle case when fold is on single line

This commit is contained in:
nightwing 2011-12-15 20:12:47 +04:00
commit c491ec9a5b

View file

@ -710,6 +710,15 @@ 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);