1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 07:22:27 +01:00

move getMapLeader() to liberator.Mappings

This commit is contained in:
Doug Kearns
2008-09-11 16:39:29 +00:00
parent eda172d8c2
commit fefa6e4609
4 changed files with 12 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ liberator.Mappings = function () //{{{
function expandLeader(keyString)
{
var leaderRegexp = /<Leader>/i;
var currentLeader = liberator.events.getMapLeader();
var currentLeader = liberator.mappings.getMapLeader();
return keyString.replace(leaderRegexp, currentLeader);
}
@@ -345,6 +345,12 @@ liberator.Mappings = function () //{{{
return matches;
},
getMapLeader: function ()
{
var leaderRef = liberator.variableReference("mapleader");
return leaderRef[0] ? leaderRef[0][leaderRef[1]] : "\\";
},
// returns whether the user added a custom user map
hasMap: function (mode, cmd)
{