mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-06 03:44:10 +01:00
remove duplication in private getMap() of Mappings
This commit is contained in:
@@ -128,10 +128,8 @@ vimperator.Mappings = function() //{{{
|
|||||||
|
|
||||||
for (var i = 0; i < maps.length; i++)
|
for (var i = 0; i < maps.length; i++)
|
||||||
{
|
{
|
||||||
names = maps[i].names;
|
if (maps[i].hasName(cmd))
|
||||||
for (var j = 0; j < names.length; j++)
|
return maps[i];
|
||||||
if (names[j] == cmd)
|
|
||||||
return maps[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@@ -308,6 +306,7 @@ vimperator.Mappings = function() //{{{
|
|||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
////////////////////// DEFAULT MAPPINGS ////////////////////////////////////////
|
////////////////////// DEFAULT MAPPINGS ////////////////////////////////////////
|
||||||
/////////////////////////////////////////////////////////////////////////////{{{
|
/////////////////////////////////////////////////////////////////////////////{{{
|
||||||
|
|
||||||
var anymode = [vimperator.modes.NORMAL,
|
var anymode = [vimperator.modes.NORMAL,
|
||||||
vimperator.modes.INSERT,
|
vimperator.modes.INSERT,
|
||||||
vimperator.modes.VISUAL,
|
vimperator.modes.VISUAL,
|
||||||
@@ -324,6 +323,7 @@ vimperator.Mappings = function() //{{{
|
|||||||
//
|
//
|
||||||
// Normal mode
|
// Normal mode
|
||||||
// {{{
|
// {{{
|
||||||
|
|
||||||
// vimperator management
|
// vimperator management
|
||||||
addDefaultMap(new vimperator.Map(anymode, ["<F1>"],
|
addDefaultMap(new vimperator.Map(anymode, ["<F1>"],
|
||||||
function() { vimperator.help(null); },
|
function() { vimperator.help(null); },
|
||||||
|
|||||||
Reference in New Issue
Block a user