mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:07:59 +01:00
Fix macro interpolation of null counts in key bindings.
This commit is contained in:
@@ -335,14 +335,14 @@ var Command = Class("Command", {
|
|||||||
case "-keys":
|
case "-keys":
|
||||||
let silent = args["-silent"];
|
let silent = args["-silent"];
|
||||||
rhs = events.canonicalKeys(rhs, true);
|
rhs = events.canonicalKeys(rhs, true);
|
||||||
let macro = util.compileMacro(rhs, true);
|
var action = function action(count) events.feedkeys(action.macro({ count: count || "" }),
|
||||||
var action = function action(count) events.feedkeys(macro({ count: count }),
|
|
||||||
noremap, silent);
|
noremap, silent);
|
||||||
|
action.macro = util.compileMacro(rhs, true);
|
||||||
break;
|
break;
|
||||||
case "-ex":
|
case "-ex":
|
||||||
macro = util.compileMacro(rhs, true);
|
action = function action() commands.execute(action.macro, makeParams.apply(this, arguments),
|
||||||
action = function action() commands.execute(macro, makeParams.apply(this, arguments),
|
|
||||||
false, null, action.sourcing);
|
false, null, action.sourcing);
|
||||||
|
action.macro = util.compileMacro(rhs, true);
|
||||||
action.sourcing = io.sourcing && update({}, io.sourcing);
|
action.sourcing = io.sourcing && update({}, io.sourcing);
|
||||||
break;
|
break;
|
||||||
case "-javascript":
|
case "-javascript":
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
|||||||
stack.top.elements.push(quote(defaults[name]));
|
stack.top.elements.push(quote(defaults[name]));
|
||||||
else {
|
else {
|
||||||
stack.top.elements.push(update(
|
stack.top.elements.push(update(
|
||||||
function (obj) obj[name] != null ? quote(obj[name]) : unknown(full),
|
function (obj) obj[name] != null ? quote(obj[name]) : set.has(obj, name) ? "" : unknown(full),
|
||||||
{ test: function (obj) obj[name] != null && obj[name] !== false }));
|
{ test: function (obj) obj[name] != null && obj[name] !== false }));
|
||||||
|
|
||||||
for (let elem in array.iterValues(stack))
|
for (let elem in array.iterValues(stack))
|
||||||
|
|||||||
Reference in New Issue
Block a user