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/search/search.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
(limited to 'public/vendor/codemirror/addon/search')
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