Fix bug in TextLayer.updateLines
This commit is contained in:
parent
c22d80398a
commit
4beecc086a
2 changed files with 12 additions and 1 deletions
|
|
@ -1498,6 +1498,10 @@ var EditSession = function(text, mode) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.containsRow = function(row) {
|
||||||
|
return row >= this.start.row && row <= this.end.row;
|
||||||
|
}
|
||||||
|
|
||||||
this.walk = function(callback, endRow, endColumn) {
|
this.walk = function(callback, endRow, endColumn) {
|
||||||
var lastEnd = 0,
|
var lastEnd = 0,
|
||||||
folds = this.folds,
|
folds = this.folds,
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,15 @@ var Text = function(parentEl) {
|
||||||
lineElementsIdx = 0;
|
lineElementsIdx = 0;
|
||||||
|
|
||||||
for (var row = config.firstRow; row < first; row++) {
|
for (var row = config.firstRow; row < first; row++) {
|
||||||
|
var foldLine = this.session.getFoldLine(row);
|
||||||
|
if (foldLine) {
|
||||||
|
if (foldLine.containsRow(first)) {
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
row = foldLine.end.row;
|
||||||
|
}
|
||||||
|
}
|
||||||
lineElementsIdx ++;
|
lineElementsIdx ++;
|
||||||
row = this.session.getRowFoldEnd(row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i=first; i<=last; i++) {
|
for (var i=first; i<=last; i++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue