1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-07 22:45:46 +01:00

Fix #232 (pass count through :mapped commands)

This commit is contained in:
Conrad Irwin
2009-06-07 03:02:11 +01:00
parent 834acb2776
commit 4892a927f8

View File

@@ -82,7 +82,7 @@ Map.prototype = {
* @param {string} name The name to query. * @param {string} name The name to query.
* @returns {boolean} * @returns {boolean}
*/ */
hasName: function (name) this.names.indexOf(name) >= 0 || this.names.indexOf(name.replace(/<S-(.)>/g, "$1")) >= 0, hasName: function (name) this.names.indexOf(name) >= 0,
/** /**
* Execute the action for this mapping. * Execute the action for this mapping.
@@ -211,7 +211,7 @@ function Mappings() //{{{
{ {
mappings.addUserMap([m], [lhs], mappings.addUserMap([m], [lhs],
"User defined mapping", "User defined mapping",
function (count) { events.feedkeys((count > 1 ? count : "") + this.rhs, this.noremap, this.silent); }, function (count) { events.feedkeys((count > -1 ? count : "") + this.rhs, this.noremap, this.silent); },
{ {
flags: Mappings.flags.COUNT, flags: Mappings.flags.COUNT,
rhs: events.canonicalKeys(rhs), rhs: events.canonicalKeys(rhs),