mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 00:17:58 +01:00
Preparation for a future commit and fix ;F in the MOW.
This commit is contained in:
@@ -110,26 +110,6 @@ const CommandLine = Module("commandline", {
|
||||
this._startHints = false; // whether we're waiting to start hints mode
|
||||
this._lastSubstring = "";
|
||||
|
||||
memoize(this, "widgets", function () {
|
||||
let widgets = {
|
||||
commandline: document.getElementById("dactyl-commandline"),
|
||||
prompt: document.getElementById("dactyl-commandline-prompt"),
|
||||
command: document.getElementById("dactyl-commandline-command"),
|
||||
|
||||
message: document.getElementById("dactyl-message"),
|
||||
|
||||
multilineOutput: document.getElementById("dactyl-multiline-output"),
|
||||
multilineInput: document.getElementById("dactyl-multiline-input")
|
||||
};
|
||||
|
||||
widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
||||
widgets.message.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
||||
widgets.mowContainer = widgets.multilineOutput.parentNode;
|
||||
|
||||
widgets.multilineOutput.contentDocument.body.id = "dactyl-multiline-output-content";
|
||||
return widgets;
|
||||
});
|
||||
|
||||
// we need to save the mode which were in before opening the command line
|
||||
// this is then used if we focus the command line again without the "official"
|
||||
// way of calling "open"
|
||||
@@ -344,6 +324,26 @@ const CommandLine = Module("commandline", {
|
||||
}, this);
|
||||
},
|
||||
|
||||
widgets: Class.memoize(function () {
|
||||
let widgets = {
|
||||
commandline: document.getElementById("dactyl-commandline"),
|
||||
prompt: document.getElementById("dactyl-commandline-prompt"),
|
||||
command: document.getElementById("dactyl-commandline-command"),
|
||||
|
||||
message: document.getElementById("dactyl-message"),
|
||||
|
||||
multilineOutput: document.getElementById("dactyl-multiline-output"),
|
||||
multilineInput: document.getElementById("dactyl-multiline-input")
|
||||
};
|
||||
|
||||
widgets.command.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
||||
widgets.message.inputField.QueryInterface(Ci.nsIDOMNSEditableElement);
|
||||
widgets.mowContainer = widgets.multilineOutput.parentNode;
|
||||
|
||||
widgets.multilineOutput.contentDocument.body.id = "dactyl-multiline-output-content";
|
||||
return widgets;
|
||||
}),
|
||||
|
||||
// @param type can be:
|
||||
// "submit": when the user pressed enter in the command line
|
||||
// "change"
|
||||
|
||||
Reference in New Issue
Block a user