mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-14 10:05:47 +01:00
Fix :set! without premature commandline instantiation.
Fix :let and options.listPrefs.
This commit is contained in:
@@ -870,7 +870,7 @@ var Options = Module("options", {
|
|||||||
allPrefs: deprecated("prefs.getNames", function allPrefs() prefs.getNames.apply(prefs, arguments)),
|
allPrefs: deprecated("prefs.getNames", function allPrefs() prefs.getNames.apply(prefs, arguments)),
|
||||||
getPref: deprecated("prefs.get", function getPref() prefs.get.apply(prefs, arguments)),
|
getPref: deprecated("prefs.get", function getPref() prefs.get.apply(prefs, arguments)),
|
||||||
invertPref: deprecated("prefs.invert", function invertPref() prefs.invert.apply(prefs, arguments)),
|
invertPref: deprecated("prefs.invert", function invertPref() prefs.invert.apply(prefs, arguments)),
|
||||||
listPrefs: deprecated("prefs.list", function listPrefs() { commandline.commandOutput(prefs.list.apply(prefs, arguments)); }),
|
listPrefs: deprecated("prefs.list", function listPrefs() { this.modules.commandline.commandOutput(prefs.list.apply(prefs, arguments)); }),
|
||||||
observePref: deprecated("prefs.observe", function observePref() prefs.observe.apply(prefs, arguments)),
|
observePref: deprecated("prefs.observe", function observePref() prefs.observe.apply(prefs, arguments)),
|
||||||
popContext: deprecated("prefs.popContext", function popContext() prefs.popContext.apply(prefs, arguments)),
|
popContext: deprecated("prefs.popContext", function popContext() prefs.popContext.apply(prefs, arguments)),
|
||||||
pushContext: deprecated("prefs.pushContext", function pushContext() prefs.pushContext.apply(prefs, arguments)),
|
pushContext: deprecated("prefs.pushContext", function pushContext() prefs.pushContext.apply(prefs, arguments)),
|
||||||
@@ -978,7 +978,7 @@ var Options = Module("options", {
|
|||||||
}, {
|
}, {
|
||||||
}, {
|
}, {
|
||||||
commands: function initCommands(dactyl, modules, window) {
|
commands: function initCommands(dactyl, modules, window) {
|
||||||
const { commandline, commands, contexts, options } = modules;
|
const { commands, contexts, options } = modules;
|
||||||
|
|
||||||
let args = {
|
let args = {
|
||||||
getMode: function (args) findMode(args["-mode"]),
|
getMode: function (args) findMode(args["-mode"]),
|
||||||
@@ -1048,7 +1048,7 @@ var Options = Module("options", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (name == "all" && reset)
|
if (name == "all" && reset)
|
||||||
commandline.input(_("pref.prompt.resetAll", config.host) + " ",
|
modules.commandline.input(_("pref.prompt.resetAll", config.host) + " ",
|
||||||
function (resp) {
|
function (resp) {
|
||||||
if (resp == "yes")
|
if (resp == "yes")
|
||||||
for (let pref in values(prefs.getNames()))
|
for (let pref in values(prefs.getNames()))
|
||||||
@@ -1056,7 +1056,7 @@ var Options = Module("options", {
|
|||||||
},
|
},
|
||||||
{ promptHighlight: "WarningMsg" });
|
{ promptHighlight: "WarningMsg" });
|
||||||
else if (name == "all")
|
else if (name == "all")
|
||||||
commandline.commandOutput(prefs.list(onlyNonDefault, ""));
|
modules.commandline.commandOutput(prefs.list(onlyNonDefault, ""));
|
||||||
else if (reset)
|
else if (reset)
|
||||||
prefs.reset(name);
|
prefs.reset(name);
|
||||||
else if (invertBoolean)
|
else if (invertBoolean)
|
||||||
@@ -1078,7 +1078,7 @@ var Options = Module("options", {
|
|||||||
prefs.set(name, value);
|
prefs.set(name, value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
commandline.commandOutput(prefs.list(onlyNonDefault, name));
|
modules.commandline.commandOutput(prefs.list(onlyNonDefault, name));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1235,7 +1235,7 @@ var Options = Module("options", {
|
|||||||
if (str.text().length() == str.*.length())
|
if (str.text().length() == str.*.length())
|
||||||
dactyl.echomsg(_("variable.none"));
|
dactyl.echomsg(_("variable.none"));
|
||||||
else
|
else
|
||||||
dactyl.echo(str, commandline.FORCE_MULTILINE);
|
dactyl.echo(str, modules.commandline.FORCE_MULTILINE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user