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:
@@ -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");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user