summaryrefslogtreecommitdiff
path: root/public/vendor/codemirror/addon/merge
diff options
context:
space:
mode:
authorWu Cheng-Han2016-07-30 12:25:24 +0800
committerWu Cheng-Han2016-07-30 12:25:24 +0800
commit1490eafdd26a576dcc3832d1811802c0162dfe84 (patch)
treeabf105de4a0ec1659672643b7583330a421e79bb /public/vendor/codemirror/addon/merge
parentb6ca8649af10d969d86f0e8ff31723321d43087a (diff)
Update CodeMirror to version 5.17.1
Diffstat (limited to 'public/vendor/codemirror/addon/merge')
-rw-r--r--public/vendor/codemirror/addon/merge/merge.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/public/vendor/codemirror/addon/merge/merge.js b/public/vendor/codemirror/addon/merge/merge.js
index d67b760c..cc94cafb 100644
--- a/public/vendor/codemirror/addon/merge/merge.js
+++ b/public/vendor/codemirror/addon/merge/merge.js
@@ -284,7 +284,9 @@
if (dv.copyButtons) clear(dv.copyButtons);
var vpEdit = dv.edit.getViewport(), vpOrig = dv.orig.getViewport();
- var sTopEdit = dv.edit.getScrollInfo().top, sTopOrig = dv.orig.getScrollInfo().top;
+ var outerTop = dv.mv.wrap.getBoundingClientRect().top
+ var sTopEdit = outerTop - dv.edit.getScrollerElement().getBoundingClientRect().top + dv.edit.getScrollInfo().top
+ var sTopOrig = outerTop - dv.orig.getScrollerElement().getBoundingClientRect().top + dv.orig.getScrollInfo().top;
for (var i = 0; i < dv.chunks.length; i++) {
var ch = dv.chunks[i];
if (ch.editFrom <= vpEdit.to && ch.editTo >= vpEdit.from &&