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

This commit is contained in:
Victor Porof 2013-11-28 20:38:42 +02:00
parent f8b9e6adbb
commit 75cae2feb4

View File

@ -189,14 +189,17 @@ let DebuggerView = {
dumpn("Initializing the DebuggerView editor");
let extraKeys = {};
let tokenSearch = document.getElementById("tokenSearchKey").getAttribute("key");
let globalSearch = document.getElementById("globalSearchKey").getAttribute("key");
let tokenSearchShortcut = Editor.accel(tokenSearch);
let globalSearchShortcut = Editor.accel(globalSearch, { alt: true });
extraKeys[tokenSearchShortcut] = () => this.Filtering._doTokenSearch();
extraKeys[globalSearchShortcut] = () => this.Filtering._doGlobalSearch();
bindKey("_doTokenSearch", "tokenSearchKey");
bindKey("_doGlobalSearch", "globalSearchKey", { alt: true });
bindKey("_doFunctionSearch", "functionSearchKey");
extraKeys[Editor.keyFor("jumpToLine")] = false;
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({
mode: Editor.modes.text,
readOnly: true,