From b8221a475b6fa7b7683bbcf54fcab40d40c0e80f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 25 Oct 2007 07:42:20 +0000 Subject: [PATCH] remove duplication in private getMap() of Mappings --- content/mappings.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/mappings.js b/content/mappings.js index 0af70d22..42df2764 100644 --- a/content/mappings.js +++ b/content/mappings.js @@ -128,10 +128,8 @@ vimperator.Mappings = function() //{{{ for (var i = 0; i < maps.length; i++) { - names = maps[i].names; - for (var j = 0; j < names.length; j++) - if (names[j] == cmd) - return maps[i]; + if (maps[i].hasName(cmd)) + return maps[i]; } return null; @@ -308,6 +306,7 @@ vimperator.Mappings = function() //{{{ /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// DEFAULT MAPPINGS //////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ + var anymode = [vimperator.modes.NORMAL, vimperator.modes.INSERT, vimperator.modes.VISUAL, @@ -324,6 +323,7 @@ vimperator.Mappings = function() //{{{ // // Normal mode // {{{ + // vimperator management addDefaultMap(new vimperator.Map(anymode, [""], function() { vimperator.help(null); },