From eaa8ccaccb1091820d0a8d1223996a6dd057347d Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Sun, 17 Jan 2016 14:28:04 -0600 Subject: Upgrade CodeMirror to 5.10.1 and now support fullscreen, jump-to-line in editor --- public/vendor/codemirror/addon/fold/brace-fold.js | 0 public/vendor/codemirror/addon/fold/comment-fold.js | 4 +++- public/vendor/codemirror/addon/fold/foldcode.js | 0 public/vendor/codemirror/addon/fold/foldgutter.css | 0 public/vendor/codemirror/addon/fold/foldgutter.js | 4 ++-- public/vendor/codemirror/addon/fold/indent-fold.js | 0 public/vendor/codemirror/addon/fold/markdown-fold.js | 0 public/vendor/codemirror/addon/fold/xml-fold.js | 0 8 files changed, 5 insertions(+), 3 deletions(-) mode change 100755 => 100644 public/vendor/codemirror/addon/fold/brace-fold.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/comment-fold.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/foldcode.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/foldgutter.css mode change 100755 => 100644 public/vendor/codemirror/addon/fold/foldgutter.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/indent-fold.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/markdown-fold.js mode change 100755 => 100644 public/vendor/codemirror/addon/fold/xml-fold.js (limited to 'public/vendor/codemirror/addon/fold') diff --git a/public/vendor/codemirror/addon/fold/brace-fold.js b/public/vendor/codemirror/addon/fold/brace-fold.js old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/addon/fold/comment-fold.js b/public/vendor/codemirror/addon/fold/comment-fold.js old mode 100755 new mode 100644 index b75db7ea..60fa3e43 --- a/public/vendor/codemirror/addon/fold/comment-fold.js +++ b/public/vendor/codemirror/addon/fold/comment-fold.js @@ -28,7 +28,9 @@ CodeMirror.registerGlobalHelper("fold", "comment", function(mode) { continue; } if (pass == 1 && found < start.ch) return; - if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1)))) { + if (/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found + 1))) && + (lineText.slice(found - endToken.length, found) == endToken || + !/comment/.test(cm.getTokenTypeAt(CodeMirror.Pos(line, found))))) { startCh = found + startToken.length; break; } diff --git a/public/vendor/codemirror/addon/fold/foldcode.js b/public/vendor/codemirror/addon/fold/foldcode.js old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/addon/fold/foldgutter.css b/public/vendor/codemirror/addon/fold/foldgutter.css old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/addon/fold/foldgutter.js b/public/vendor/codemirror/addon/fold/foldgutter.js old mode 100755 new mode 100644 index ed7bd87d..f101e267 --- a/public/vendor/codemirror/addon/fold/foldgutter.js +++ b/public/vendor/codemirror/addon/fold/foldgutter.js @@ -20,7 +20,7 @@ cm.off("viewportChange", onViewportChange); cm.off("fold", onFold); cm.off("unfold", onFold); - cm.off("swapDoc", updateInViewport); + cm.off("swapDoc", onChange); } if (val) { cm.state.foldGutter = new State(parseOptions(val)); @@ -30,7 +30,7 @@ cm.on("viewportChange", onViewportChange); cm.on("fold", onFold); cm.on("unfold", onFold); - cm.on("swapDoc", updateInViewport); + cm.on("swapDoc", onChange); } }); diff --git a/public/vendor/codemirror/addon/fold/indent-fold.js b/public/vendor/codemirror/addon/fold/indent-fold.js old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/addon/fold/markdown-fold.js b/public/vendor/codemirror/addon/fold/markdown-fold.js old mode 100755 new mode 100644 diff --git a/public/vendor/codemirror/addon/fold/xml-fold.js b/public/vendor/codemirror/addon/fold/xml-fold.js old mode 100755 new mode 100644 -- cgit v1.2.3