From 3dbe128d10fd35f39ea89757eaae4a5876aa968b Mon Sep 17 00:00:00 2001 From: nightwing Date: Sat, 19 Nov 2011 17:04:18 +0400 Subject: [PATCH] fix: removeFolds splits foldLine incorrectly --- lib/ace/edit_session/folding.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/ace/edit_session/folding.js b/lib/ace/edit_session/folding.js index 41ff192e..32dd00c4 100644 --- a/lib/ace/edit_session/folding.js +++ b/lib/ace/edit_session/folding.js @@ -368,13 +368,13 @@ function Folding() { folds.splice(folds.indexOf(fold), 1); } else // The fold goes over more then one row. This means remvoing this fold - // will cause the fold line to get splitted up. + // will cause the fold line to get splitted up. newFoldLine is the second part { var newFoldLine = foldLine.split(fold.start.row, fold.start.column); - newFoldLine.folds.shift(); - foldLine.start.row = folds[0].start.row; - foldLine.start.column = folds[0].start.column; - this.$addFoldLine(newFoldLine); + folds = newFoldLine.folds; + folds.shift(); + newFoldLine.start.row = folds[0].start.row; + newFoldLine.start.column = folds[0].start.column; } if (this.$useWrapMode) {