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"); dumpn("Initializing the DebuggerView editor");
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[Editor.keyFor("jumpToLine")] = false; 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({ this.editor = new Editor({
mode: Editor.modes.text, mode: Editor.modes.text,
readOnly: true, readOnly: true,