diff --git a/chrome/content/vimperator/commands.js b/chrome/content/vimperator/commands.js index e48973f7..3fea7187 100644 --- a/chrome/content/vimperator/commands.js +++ b/chrome/content/vimperator/commands.js @@ -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"); diff --git a/chrome/content/vimperator/mappings.js b/chrome/content/vimperator/mappings.js index 9547c773..dd300714 100644 --- a/chrome/content/vimperator/mappings.js +++ b/chrome/content/vimperator/mappings.js @@ -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)