1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-14 10:05:46 +01:00

:map sans -count ≡ :map -count 〈lhs〉 <count>〈rhs〉

This commit is contained in:
Kris Maglione
2011-06-01 17:49:08 -04:00
parent 1625cbbd4c
commit 1d01dc70c3

View File

@@ -477,6 +477,9 @@ var Mappings = Module("mappings", {
return; return;
} }
if (args[1] && !args["-count"] && !args["-ex"] && !args["-javascript"])
args[1] = "<count>" + args[1];
let [lhs, rhs] = args; let [lhs, rhs] = args;
if (noremap) if (noremap)
args["-builtin"] = true; args["-builtin"] = true;
@@ -492,7 +495,7 @@ var Mappings = Module("mappings", {
contexts.bindMacro(args, "-keys", function (params) params), contexts.bindMacro(args, "-keys", function (params) params),
{ {
arg: args["-arg"], arg: args["-arg"],
count: args["-count"], count: args["-count"] || !(args["-ex"] || args["-javascript"]),
noremap: args["-builtin"], noremap: args["-builtin"],
persist: !args["-nopersist"], persist: !args["-nopersist"],
get rhs() String(this.action), get rhs() String(this.action),