diff options
author | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2016-01-17 14:28:04 -0600 |
commit | eaa8ccaccb1091820d0a8d1223996a6dd057347d (patch) | |
tree | 6b4aaa3b3d1a2fed68147510142663222533775a /public/vendor/codemirror/addon/merge | |
parent | ce65e58096d57ace02723d11a125673f9d48c293 (diff) |
Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor
Diffstat (limited to 'public/vendor/codemirror/addon/merge')
-rw-r--r--[-rwxr-xr-x] | public/vendor/codemirror/addon/merge/merge.css | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | public/vendor/codemirror/addon/merge/merge.js | 13 |
2 files changed, 5 insertions, 8 deletions
diff --git a/public/vendor/codemirror/addon/merge/merge.css b/public/vendor/codemirror/addon/merge/merge.css index a6a80e43..a6a80e43 100755..100644 --- a/public/vendor/codemirror/addon/merge/merge.css +++ b/public/vendor/codemirror/addon/merge/merge.css diff --git a/public/vendor/codemirror/addon/merge/merge.js b/public/vendor/codemirror/addon/merge/merge.js index 5b04b032..830a5f02 100755..100644 --- a/public/vendor/codemirror/addon/merge/merge.js +++ b/public/vendor/codemirror/addon/merge/merge.js @@ -5,12 +5,12 @@ (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS - mod(require("../../lib/codemirror"), require("diff_match_patch")); + mod(require("../../lib/codemirror")); // Note non-packaged dependency diff_match_patch else if (typeof define == "function" && define.amd) // AMD define(["../../lib/codemirror", "diff_match_patch"], mod); else // Plain browser env - mod(CodeMirror, diff_match_patch); -})(function(CodeMirror, diff_match_patch) { + mod(CodeMirror); +})(function(CodeMirror) { "use strict"; var Pos = CodeMirror.Pos; var svgNS = "http://www.w3.org/2000/svg"; @@ -471,13 +471,10 @@ if (left) left.init(leftPane, origLeft, options); if (right) right.init(rightPane, origRight, options); - if (options.collapseIdentical) { - updating = true; + if (options.collapseIdentical) this.editor().operation(function() { collapseIdenticalStretches(self, options.collapseIdentical); }); - updating = false; - } if (options.connect == "align") { this.aligners = []; alignChunks(this.left || this.right, true); @@ -640,7 +637,7 @@ mark.clear(); cm.removeLineClass(from, "wrap", "CodeMirror-merge-collapsed-line"); } - widget.addEventListener("click", clear); + CodeMirror.on(widget, "click", clear); return {mark: mark, clear: clear}; } |