1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 20:07:59 +01:00

allow {count}, and other flags, to be passed to e user mapping's action

This commit is contained in:
Doug Kearns
2007-07-22 07:18:05 +00:00
parent 38fd04be35
commit ab05f48462
2 changed files with 5 additions and 4 deletions

View File

@@ -531,15 +531,17 @@ function Commands() //{{{
}
else
{
// NOTE: we currently only allow one normal mode command in {rhs}
var map = vimperator.mappings.get(vimperator.modes.NORMAL, rhs);
// create a new Map for {lhs} with the same action as
// {rhs}...until we have feedkeys().
// NOTE: Currently only really useful for static use ie. from
// the RC file
// NOTE: Currently only really intended for static use (e.g.
// from the RC file) since {rhs} is evaluated when the map
// is created not at runtime
if (map)
vimperator.mappings.add(
new Map(vimperator.modes.NORMAL, [lhs], map.action, { rhs: rhs })
new Map(vimperator.modes.NORMAL, [lhs], map.action, { flags: map.flags, rhs: rhs })
);
else
vimperator.echoerr("E475: Invalid argument: " + "{rhs} must be a existing singular mapping");

View File

@@ -63,7 +63,6 @@ function Map(mode, cmds, action, extra_info) //{{{
this.cancel_mode = extra_info.cancel_mode || false;
this.always_active = extra_info.always_active || false;
}
}
Map.prototype.hasName = function(name)