From cd55bfbcb1d0fd28f432aa6b7f81fff630d387c3 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sun, 26 Dec 2010 14:41:10 -0500 Subject: [PATCH] Fix macro interpolation of null counts in key bindings. --- common/content/commands.js | 8 ++++---- common/modules/util.jsm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/content/commands.js b/common/content/commands.js index b650f464..ea26975d 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -335,14 +335,14 @@ var Command = Class("Command", { case "-keys": let silent = args["-silent"]; rhs = events.canonicalKeys(rhs, true); - let macro = util.compileMacro(rhs, true); - var action = function action(count) events.feedkeys(macro({ count: count }), + var action = function action(count) events.feedkeys(action.macro({ count: count || "" }), noremap, silent); + action.macro = util.compileMacro(rhs, true); break; case "-ex": - macro = util.compileMacro(rhs, true); - action = function action() commands.execute(macro, makeParams.apply(this, arguments), + action = function action() commands.execute(action.macro, makeParams.apply(this, arguments), false, null, action.sourcing); + action.macro = util.compileMacro(rhs, true); action.sourcing = io.sourcing && update({}, io.sourcing); break; case "-javascript": diff --git a/common/modules/util.jsm b/common/modules/util.jsm index 919b1221..50ed3c9a 100644 --- a/common/modules/util.jsm +++ b/common/modules/util.jsm @@ -328,7 +328,7 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]), stack.top.elements.push(quote(defaults[name])); else { 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 })); for (let elem in array.iterValues(stack))