Skip to content
Snippets Groups Projects
Commit 6e391b83 authored by Victor Porof's avatar Victor Porof
Browse files

Bug 932305 - The Cmd-D shortcut no longer works, r=past, a=bajaj

parent b10be29e
No related branches found
No related tags found
No related merge requests found
...@@ -190,16 +190,20 @@ let DebuggerView = { ...@@ -190,16 +190,20 @@ let DebuggerView = {
// This needs to be more localizable: see bug 929234. // This needs to be more localizable: see bug 929234.
let extraKeys = {}; let extraKeys = {};
let tokenSearch = document.getElementById("tokenSearchKey").getAttribute("key"); bindKey("_doTokenSearch", "tokenSearchKey");
let globalSearch = document.getElementById("globalSearchKey").getAttribute("key"); bindKey("_doGlobalSearch", "globalSearchKey", { alt: true });
let tokenSearchShortcut = Editor.accel(tokenSearch); bindKey("_doFunctionSearch", "functionSearchKey");
let globalSearchShortcut = Editor.accel(globalSearch, { alt: true });
extraKeys[tokenSearchShortcut] = () => this.Filtering._doTokenSearch();
extraKeys[globalSearchShortcut] = () => this.Filtering._doGlobalSearch();
extraKeys[(Services.appinfo.OS == "Darwin" ? "Cmd-" : "Ctrl-") + "F"] = (cm) => { extraKeys[(Services.appinfo.OS == "Darwin" ? "Cmd-" : "Ctrl-") + "F"] = (cm) => {
DebuggerView.Filtering._doTokenSearch(); DebuggerView.Filtering._doTokenSearch();
}; };
function bindKey(func, key, modifiers = {}) {
let key = document.getElementById(key).getAttribute("key");
let shortcut = Editor.accel(key, modifiers);
extraKeys[shortcut] = () => DebuggerView.Filtering[func]();
}
this.editor = new Editor({ this.editor = new Editor({
mode: Editor.modes.text, mode: Editor.modes.text,
readOnly: true, readOnly: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment