From 4e64583a0b6175d2c9a6729ffde1472dd55d389c Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 15 May 2015 12:58:13 +0800 Subject: Marked as 0.2.8 --- public/vendor/codemirror/addon/dialog/dialog.css | 4 ++++ public/vendor/codemirror/addon/scroll/annotatescrollbar.js | 2 +- public/vendor/codemirror/addon/scroll/simplescrollbars.css | 3 ++- public/vendor/codemirror/addon/scroll/simplescrollbars.js | 3 +-- public/vendor/codemirror/addon/search/search.js | 8 ++++---- 5 files changed, 12 insertions(+), 8 deletions(-) (limited to 'public/vendor/codemirror/addon') diff --git a/public/vendor/codemirror/addon/dialog/dialog.css b/public/vendor/codemirror/addon/dialog/dialog.css index 2e7c0fc9..c8c139d9 100755 --- a/public/vendor/codemirror/addon/dialog/dialog.css +++ b/public/vendor/codemirror/addon/dialog/dialog.css @@ -27,6 +27,10 @@ font-family: monospace; } +.CodeMirror-dialog input::selection { + color: white; +} + .CodeMirror-dialog button { font-size: 70%; } diff --git a/public/vendor/codemirror/addon/scroll/annotatescrollbar.js b/public/vendor/codemirror/addon/scroll/annotatescrollbar.js index e62a45ac..cf92d16d 100755 --- a/public/vendor/codemirror/addon/scroll/annotatescrollbar.js +++ b/public/vendor/codemirror/addon/scroll/annotatescrollbar.js @@ -97,7 +97,7 @@ var height = Math.max(bottom - top, 3); var elt = frag.appendChild(document.createElement("div")); - elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth - 1, 2) + "px; top: " + elt.style.cssText = "position: absolute; right: 0px; width: " + Math.max(cm.display.barWidth * 2, 2) + "px; top: " + (top + this.buttonHeight) + "px; height: " + height + "px"; elt.className = this.options.className; } diff --git a/public/vendor/codemirror/addon/scroll/simplescrollbars.css b/public/vendor/codemirror/addon/scroll/simplescrollbars.css index 5eea7aa1..136be9ac 100755 --- a/public/vendor/codemirror/addon/scroll/simplescrollbars.css +++ b/public/vendor/codemirror/addon/scroll/simplescrollbars.css @@ -38,8 +38,9 @@ .CodeMirror-overlayscroll-horizontal div, .CodeMirror-overlayscroll-vertical div { position: absolute; - background: #bcd; + background: #ccc; border-radius: 3px; + margin: 2px; } .CodeMirror-overlayscroll-horizontal, .CodeMirror-overlayscroll-vertical { diff --git a/public/vendor/codemirror/addon/scroll/simplescrollbars.js b/public/vendor/codemirror/addon/scroll/simplescrollbars.js index f78353a1..4f0d0d0f 100755 --- a/public/vendor/codemirror/addon/scroll/simplescrollbars.js +++ b/public/vendor/codemirror/addon/scroll/simplescrollbars.js @@ -75,14 +75,13 @@ this.screen = clientSize; this.total = scrollSize; this.size = barSize; - var buttonSize = this.screen * (this.size / this.total); if (buttonSize < minButtonSize) { this.size -= minButtonSize - buttonSize; buttonSize = minButtonSize; } this.inner.style[this.orientation == "horizontal" ? "width" : "height"] = - buttonSize + "px"; + (buttonSize - 4) + "px"; this.inner.style[this.orientation == "horizontal" ? "left" : "top"] = this.pos * (this.size / this.total) + "px"; }; diff --git a/public/vendor/codemirror/addon/search/search.js b/public/vendor/codemirror/addon/search/search.js index 1c8ca3c2..afa85ebe 100755 --- a/public/vendor/codemirror/addon/search/search.js +++ b/public/vendor/codemirror/addon/search/search.js @@ -118,7 +118,7 @@ var doReplaceConfirm = "Replace? "; function replace(cm, all) { if (cm.getOption("readOnly")) return; - var query = cm.getSelection() || getSearchState().lastQuery; + var query = cm.getSelection() || getSearchState(cm).lastQuery; dialog(cm, replaceQueryDialog, "Replace:", query, function(query) { if (!query) return; query = parseQuery(query); @@ -128,8 +128,8 @@ for (var cursor = getSearchCursor(cm, query); cursor.findNext();) { if (typeof query != "string") { var match = cm.getRange(cursor.from(), cursor.to()).match(query); - cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];})); - } else cursor.replace(text); + cursor.replace(text.replace(/\$(\d)/g, function(_, i) {return match[i];}), "+input"); + } else cursor.replace(text, "+input"); } }); } else { @@ -149,7 +149,7 @@ }; var doReplace = function(match) { cursor.replace(typeof query == "string" ? text : - text.replace(/\$(\d)/g, function(_, i) {return match[i];})); + text.replace(/\$(\d)/g, function(_, i) {return match[i];}), "+input"); advance(); }; advance(); -- cgit v1.2.3