From 9df1f7b6cf00c374bd4742e3e1084e96051fb1e0 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Tue, 9 Aug 2011 14:16:03 -0400 Subject: [PATCH] Serialize the :map -count flag. --- common/content/mappings.js | 1 + common/modules/commands.jsm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/common/content/mappings.js b/common/content/mappings.js index f7af1c6e..3abe11e6 100644 --- a/common/content/mappings.js +++ b/common/content/mappings.js @@ -595,6 +595,7 @@ var Mappings = Module("mappings", { command: "map", options: array([ hive.name !== "user" && ["-group", hive.name], + map.count && ["-count"], ["-modes", uniqueModes(map.modes)], ["-description", map.description], map.silent && ["-silent"]]) diff --git a/common/modules/commands.jsm b/common/modules/commands.jsm index 7d7093e9..206dc902 100644 --- a/common/modules/commands.jsm +++ b/common/modules/commands.jsm @@ -165,8 +165,11 @@ var Command = Class("Command", { if (args.bang && !this.bang) throw FailedAssertion(_("command.noBang")); + args.doc = this.hive.group.lastDocument; + return !dactyl.trapErrors(function exec() { let extra = this.hive.argsExtra(args); + for (let k in properties(extra)) if (!(k in args)) Object.defineProperty(args, k, Object.getOwnPropertyDescriptor(extra, k));