summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/addon/fold
diff options
context:
space:
mode:
authorYukai Huang2016-10-11 18:39:15 +0800
committerYukai Huang2016-10-11 18:40:23 +0800
commit6e651c8108783d224c5f40d1bb8047a9ebbeff00 (patch)
treec7d501cc6ebb46399c397768b3f58ef05034c522 /public/vendor/codemirror/addon/fold
parent21028c57735028574c769fb6650322eb3f0cb924 (diff)
parentcd9f8fe36b707ff5a9f8f7be4d55145ddee97f3a (diff)
Merge branch 'master' into webpack-frontend
Diffstat (limited to 'public/vendor/codemirror/addon/fold')
-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) {