diff options
author | Cheng-Han, Wu | 2016-04-20 18:11:40 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-04-20 18:11:40 +0800 |
commit | 8bf516263c6582771e7576e8484ca8cfaa8cb9cb (patch) | |
tree | aba81172f554a50466a762db99f25e3650d7ff45 /public/vendor/codemirror/addon/merge | |
parent | edc3a31dfdb03e910d7355144280e281eeb582d5 (diff) |
Update CodeMirror to 5.13.5
Diffstat (limited to 'public/vendor/codemirror/addon/merge')
-rw-r--r-- | public/vendor/codemirror/addon/merge/merge.css | 1 | ||||
-rw-r--r-- | public/vendor/codemirror/addon/merge/merge.js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/public/vendor/codemirror/addon/merge/merge.css b/public/vendor/codemirror/addon/merge/merge.css index a6a80e43..bda3d9f8 100644 --- a/public/vendor/codemirror/addon/merge/merge.css +++ b/public/vendor/codemirror/addon/merge/merge.css @@ -60,6 +60,7 @@ position: absolute; cursor: pointer; color: #44c; + z-index: 3; } .CodeMirror-merge-copy-reverse { diff --git a/public/vendor/codemirror/addon/merge/merge.js b/public/vendor/codemirror/addon/merge/merge.js index 830a5f02..d67b760c 100644 --- a/public/vendor/codemirror/addon/merge/merge.js +++ b/public/vendor/codemirror/addon/merge/merge.js @@ -427,8 +427,9 @@ function copyChunk(dv, to, from, chunk) { if (dv.diffOutOfDate) return; - to.replaceRange(from.getRange(Pos(chunk.origFrom, 0), Pos(chunk.origTo, 0)), - Pos(chunk.editFrom, 0), Pos(chunk.editTo, 0)); + var editStart = chunk.editTo > to.lastLine() ? Pos(chunk.editFrom - 1) : Pos(chunk.editFrom, 0) + var origStart = chunk.origTo > from.lastLine() ? Pos(chunk.origFrom - 1) : Pos(chunk.origFrom, 0) + to.replaceRange(from.getRange(origStart, Pos(chunk.origTo, 0)), editStart, Pos(chunk.editTo, 0)) } // Merge view, containing 0, 1, or 2 diff views. |