Skip to content

Commit bda854e

Browse files
Sam Wilsonmarijnh
authored andcommitted
[foldcode addon] Add clearOnEnter option
Add option 'clearOnEnter' to foldcode.js and default it to true. This option determines whether the marker added when folding a line clears when the cursor enters it.
1 parent bb91581 commit bda854e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addon/fold/foldcode.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
});
5050
var myRange = cm.markText(range.from, range.to, {
5151
replacedWith: myWidget,
52-
clearOnEnter: true,
52+
clearOnEnter: getOption(cm, options, "clearOnEnter"),
5353
__isFold: true
5454
});
5555
myRange.on("clear", function(from, to) {
@@ -129,7 +129,8 @@
129129
rangeFinder: CodeMirror.fold.auto,
130130
widget: "\u2194",
131131
minFoldSize: 0,
132-
scanUp: false
132+
scanUp: false,
133+
clearOnEnter: true
133134
};
134135

135136
CodeMirror.defineOption("foldOptions", null);

0 commit comments

Comments
 (0)