Fix bug in EditSession.$updateInternalDataOnChange. Shifting the fold lines on deletion have to use end.row instead of lastRow, as lastRow is "normalized".
This commit is contained in:
parent
55e0f8ceff
commit
62f168eb8e
1 changed files with 2 additions and 2 deletions
|
|
@ -1010,7 +1010,7 @@ var EditSession = function(text, mode) {
|
|||
removedFolds = this.getFoldsInRange(e.data.range);
|
||||
this.removeFolds(removedFolds);
|
||||
|
||||
var foldLine = this.getFoldLine(lastRow);
|
||||
var foldLine = this.getFoldLine(end.row);
|
||||
var idx = 0;
|
||||
if (foldLine) {
|
||||
foldLine.addRemoveChars(end.row, end.column, start.column - end.column);
|
||||
|
|
@ -1026,7 +1026,7 @@ var EditSession = function(text, mode) {
|
|||
|
||||
for (idx; idx < foldLines.length; idx++) {
|
||||
var foldLine = foldLines[idx];
|
||||
if (foldLine.start.row >= lastRow) {
|
||||
if (foldLine.start.row >= end.row) {
|
||||
foldLine.shiftRow(-len);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue