Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1392 from adobe/randy/localize-find
Browse files Browse the repository at this point in the history
Don't need to define no-op "extra" CodeMirror keys for search commands; fix inadvertently localized CodeMirror CSS class name
  • Loading branch information
peterflynn committed Aug 17, 2012
2 parents af6c1f9 + e51ae22 commit 1547636
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
27 changes: 1 addition & 26 deletions src/editor/EditorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,32 +108,7 @@ define(function (require, exports, module) {
function _createEditorForDocument(doc, makeMasterEditor, container, range, additionalKeys) {
var mode = EditorUtils.getModeFromFileExtension(doc.file.fullPath);

var extraKeys = {
"Ctrl-F" : function () {
// No-op, handled in FindReplace.js
},
"Cmd-F" : function () {
// No-op, handled in FindReplace.js
},
"Ctrl-H": function () {
// No-op, handled in FindReplace.js
},
"Cmd-Alt-F": function () {
// No-op, handled in FindReplace.js
},
"Shift-Ctrl-F": function () {
// No-op, handled in FindInFiles.js
},
"Shift-Cmd-F" : function () {
// No-op, handled in FindInFiles.js
}
};

if (additionalKeys) {
mergeExtraKeys(null, extraKeys, additionalKeys);
}

return new Editor(doc, makeMasterEditor, mode, container, extraKeys, range);
return new Editor(doc, makeMasterEditor, mode, container, additionalKeys, range);
}

/**
Expand Down
1 change: 0 additions & 1 deletion src/nls/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ define(function (require, exports, module) {
// Find, Replace, Find in Files
exports.SEARCH_REGEXP_INFO = "Use /re/ syntax for regexp search";
exports.WITH = "With";
exports.SEARCHING = "Searching";
exports.BUTTON_YES = "Yes";
exports.BUTTON_NO = "No";
exports.BUTTON_STOP = "Stop";
Expand Down
2 changes: 1 addition & 1 deletion src/search/FindReplace.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ define(function (require, exports, module) {
if (cm.lineCount() < 2000) { // This is too expensive on big documents.
var cursor = getSearchCursor(cm, query);
while (cursor.findNext()) {
state.marked.push(cm.markText(cursor.from(), cursor.to(), Strings.SEARCHING));
state.marked.push(cm.markText(cursor.from(), cursor.to(), "CodeMirror-searching"));
}
}
state.posFrom = state.posTo = cm.getCursor();
Expand Down

0 comments on commit 1547636

Please sign in to comment.