fix row cache. fix #352
This commit is contained in:
parent
44b8d656f2
commit
df27d13b94
3 changed files with 108 additions and 20 deletions
|
|
@ -240,9 +240,6 @@ function Folding() {
|
|||
*/
|
||||
this.addFold = function(placeholder, range) {
|
||||
var foldData = this.$foldData;
|
||||
var foldRow = null;
|
||||
var foldLine;
|
||||
var folds;
|
||||
var added = false;
|
||||
|
||||
if (placeholder instanceof Fold)
|
||||
|
|
@ -286,7 +283,7 @@ function Folding() {
|
|||
throw "End of fold is outside of the document.";
|
||||
|
||||
// Check if there are folds in the range we create the new fold for.
|
||||
folds = this.getFoldsInRange(fold.range);
|
||||
var folds = this.getFoldsInRange(fold.range);
|
||||
if (folds.length > 0) {
|
||||
// Remove the folds from fold data.
|
||||
this.removeFolds(folds);
|
||||
|
|
@ -295,7 +292,7 @@ function Folding() {
|
|||
}
|
||||
|
||||
for (var i = 0; i < foldData.length; i++) {
|
||||
foldLine = foldData[i];
|
||||
var foldLine = foldData[i];
|
||||
if (endRow == foldLine.start.row) {
|
||||
foldLine.addFold(fold);
|
||||
added = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue