summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/addon/fold/xml-fold.js
diff options
context:
space:
mode:
authorWu Cheng-Han2016-10-10 21:15:29 +0800
committerWu Cheng-Han2016-10-10 21:15:29 +0800
commit795ea21191486a80437d7c535defc503962c5968 (patch)
tree434a65ec986264b2abdec29b8f6a837ca536d2dd /public/vendor/codemirror/addon/fold/xml-fold.js
parentfb5d7e43592c1a14831067e28def9c4b9e2a97ca (diff)
Update CodeMirror to 5.19.0 and rename jade to pug
Diffstat (limited to 'public/vendor/codemirror/addon/fold/xml-fold.js')
-rw-r--r--public/vendor/codemirror/addon/fold/xml-fold.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/vendor/codemirror/addon/fold/xml-fold.js b/public/vendor/codemirror/addon/fold/xml-fold.js
index f8c67b89..75a9e305 100644
--- a/public/vendor/codemirror/addon/fold/xml-fold.js
+++ b/public/vendor/codemirror/addon/fold/xml-fold.js
@@ -21,8 +21,8 @@
function Iter(cm, line, ch, range) {
this.line = line; this.ch = ch;
this.cm = cm; this.text = cm.getLine(line);
- this.min = range ? range.from : cm.firstLine();
- this.max = range ? range.to - 1 : cm.lastLine();
+ this.min = range ? Math.max(range.from, cm.firstLine()) : cm.firstLine();
+ this.max = range ? Math.min(range.to - 1, cm.lastLine()) : cm.lastLine();
}
function tagAt(iter, ch) {