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