reverted 4622 codemirror3 because broke zencoding and drops support for IE7, we do not use the new features anyway. Sorry

This commit is contained in:
mdipierro
2013-01-23 08:17:59 -06:00
parent b7f2991246
commit b1f77b9c4a
47 changed files with 4458 additions and 7601 deletions
+5 -6
View File
@@ -41,8 +41,7 @@
state.query = parseQuery(query);
if (cm.lineCount() < 2000) { // This is too expensive on big documents.
for (var cursor = getSearchCursor(cm, state.query); cursor.findNext();)
state.marked.push(cm.markText(cursor.from(), cursor.to(),
{className: "CodeMirror-searching"}));
state.marked.push(cm.markText(cursor.from(), cursor.to(), "CodeMirror-searching"));
}
state.posFrom = state.posTo = cm.getCursor();
findNext(cm, rev);
@@ -77,14 +76,14 @@
query = parseQuery(query);
dialog(cm, replacementQueryDialog, "Replace with:", function(text) {
if (all) {
cm.operation(function() {
cm.compoundChange(function() { cm.operation(function() {
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)/, function(_, i) {return match[i];}));
cursor.replace(text.replace(/\$(\d)/, function(w, i) {return match[i];}));
} else cursor.replace(text);
}
});
});});
} else {
clearSearch(cm);
var cursor = getSearchCursor(cm, query, cm.getCursor());
@@ -101,7 +100,7 @@
}
function doReplace(match) {
cursor.replace(typeof query == "string" ? text :
text.replace(/\$(\d)/, function(_, i) {return match[i];}));
text.replace(/\$(\d)/, function(w, i) {return match[i];}));
advance();
}
advance();