Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 07fca23

Browse files
committed
Addresses failing tests
1 parent af7906f commit 07fca23

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/extensions/default/CodeFolding/foldhelpers/foldgutter.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,7 @@ define(function (require, exports, module) {
359359
*/
360360
function onFold(cm, from, to) {
361361
var state = cm.state.foldGutter;
362-
if (from.line >= state.from && from.line < state.to) {
363-
updateFoldInfo(cm, from.line, from.line + 1);
364-
}
362+
updateFoldInfo(cm, from.line, from.line + 1);
365363
}
366364

367365
/**
@@ -374,7 +372,7 @@ define(function (require, exports, module) {
374372
var state = cm.state.foldGutter;
375373
var vp = cm.getViewport();
376374
delete cm._lineFolds[from.line];
377-
updateFoldInfo(cm, vp.from, to.line || vp.to);
375+
updateFoldInfo(cm, from.line, to.line || vp.to);
378376
}
379377

380378
/**

src/extensions/default/CodeFolding/unittests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ define(function (require, exports, module) {
2828
testFilesSpec = {
2929
js: {
3030
filePath: testDocumentDirectory + "test.js",
31-
foldableLines: [ 11, 17, 21, 25, 27, 30],
31+
foldableLines: [1, 11, 17, 21, 25, 27, 30],
3232
sameLevelFoldableLines: [17, 21],
3333
firstSelection: {start: {line: 2, ch: 0}, end: {line: 10, ch: 0}},
3434
secondSelection: {start: {line: 5, ch: 0}, end: {line: 8, ch: 4}}

0 commit comments

Comments
 (0)