fix row cache. fix #352

This commit is contained in:
Fabian Jakobs 2011-07-25 13:04:42 +02:00
commit df27d13b94
3 changed files with 108 additions and 20 deletions

View file

@ -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;