1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-30 14:42:26 +01:00

Serialize the :map -count flag.

This commit is contained in:
Kris Maglione
2011-08-09 14:16:03 -04:00
parent 491c9a0573
commit 9df1f7b6cf
2 changed files with 4 additions and 0 deletions

View File

@@ -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"]])

View File

@@ -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));