mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 23:17:59 +01:00
Fix unduly early loading of the commandline module.
This commit is contained in:
@@ -346,7 +346,8 @@ var Buffer = Module("buffer", {
|
|||||||
util.timeout(function () {
|
util.timeout(function () {
|
||||||
statusline.updateBufferPosition();
|
statusline.updateBufferPosition();
|
||||||
statusline.updateZoomLevel();
|
statusline.updateZoomLevel();
|
||||||
commandline.clear();
|
if (loaded.commandline)
|
||||||
|
commandline.clear();
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
// called at the very end of a page load
|
// called at the very end of a page load
|
||||||
|
|||||||
@@ -589,18 +589,15 @@ var CommandLine = Module("commandline", {
|
|||||||
|
|
||||||
get command() {
|
get command() {
|
||||||
if (this.commandVisible && this.widgets.command)
|
if (this.commandVisible && this.widgets.command)
|
||||||
return this._lastCommand = this.widgets.command[1];
|
return commands.lastCommand = this.widgets.command[1];
|
||||||
return this._lastCommand;
|
return commands.lastCommand;
|
||||||
},
|
},
|
||||||
set command(val) {
|
set command(val) {
|
||||||
if (this.commandVisible && (modes.extended & modes.EX))
|
if (this.commandVisible && (modes.extended & modes.EX))
|
||||||
return this.widgets.command = val;
|
return this.widgets.command = val;
|
||||||
return this._lastCommand = val;
|
return commands.lastCommand = val;
|
||||||
},
|
},
|
||||||
|
|
||||||
get lastCommand() this._lastCommand || this.command,
|
|
||||||
set lastCommand(val) { this._lastCommand = val; },
|
|
||||||
|
|
||||||
clear: function clear() {
|
clear: function clear() {
|
||||||
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
if (this.widgets.message && this.widgets.message[1] === this._lastClearable)
|
||||||
this.widgets.message = null;
|
this.widgets.message = null;
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ var Command = Class("Command", {
|
|||||||
|
|
||||||
get helpTag() ":" + this.name,
|
get helpTag() ":" + this.name,
|
||||||
|
|
||||||
|
get lastCommand() this._lastCommand || commandline.command,
|
||||||
|
set lastCommand(val) { this._lastCommand = val; },
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute this command.
|
* Execute this command.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -369,13 +369,12 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
* See {@link CommandLine#echo}.
|
* See {@link CommandLine#echo}.
|
||||||
*/
|
*/
|
||||||
echomsg: function (str, verbosity, flags) {
|
echomsg: function (str, verbosity, flags) {
|
||||||
flags |= commandline.APPEND_TO_MESSAGES;
|
|
||||||
|
|
||||||
if (verbosity == null)
|
if (verbosity == null)
|
||||||
verbosity = 0; // verbosity level is exclusionary
|
verbosity = 0; // verbosity level is exclusionary
|
||||||
|
|
||||||
if (options["verbose"] >= verbosity)
|
if (options["verbose"] >= verbosity)
|
||||||
commandline.echo(str, commandline.HL_INFOMSG, flags);
|
commandline.echo(str, commandline.HL_INFOMSG,
|
||||||
|
flags | commandline.APPEND_TO_MESSAGES);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -455,7 +454,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
modifiers = modifiers || {};
|
modifiers = modifiers || {};
|
||||||
|
|
||||||
if (!silent)
|
if (!silent)
|
||||||
commandline.lastCommand = str.replace(/^\s*:\s*/, "");
|
commands.lastCommand = str.replace(/^\s*:\s*/, "");
|
||||||
let res = true;
|
let res = true;
|
||||||
for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) {
|
for (let [command, args] in commands.parseCommands(str.replace(/^'(.*)'$/, "$1"))) {
|
||||||
if (command === null)
|
if (command === null)
|
||||||
@@ -1484,7 +1483,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
M: ["Always show messages outside of the status line"]
|
M: ["Always show messages outside of the status line"]
|
||||||
},
|
},
|
||||||
setter: function (opts) {
|
setter: function (opts) {
|
||||||
commandline.widgets.updateVisibility();
|
if (loaded.commandline)
|
||||||
|
commandline.widgets.updateVisibility();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1026,7 +1026,7 @@ unlet s:cpo_save
|
|||||||
|
|
||||||
},
|
},
|
||||||
modes: function (dactyl, modules, window) {
|
modes: function (dactyl, modules, window) {
|
||||||
const { commandline, modes } = modules;
|
const { modes } = modules;
|
||||||
|
|
||||||
modes.addMode("FILE_INPUT", {
|
modes.addMode("FILE_INPUT", {
|
||||||
extended: true,
|
extended: true,
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ var Overlay = Module("Overlay", {
|
|||||||
catch (e) {
|
catch (e) {
|
||||||
Class.replaceProperty(modules, module.className, obj);
|
Class.replaceProperty(modules, module.className, obj);
|
||||||
}
|
}
|
||||||
|
loaded[module.className] = true;
|
||||||
|
|
||||||
frob(module.className);
|
frob(module.className);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user