1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-30 02:35:44 +01:00

Junk dactyl.{evalExpression,variableReference}.

Replace mappings.getMapLeader() with a mappings.mapLeader property.
This commit is contained in:
Doug Kearns
2010-09-28 18:53:35 +10:00
parent 0d56dac3ac
commit 37d94aaed9
6 changed files with 54 additions and 123 deletions

View File

@@ -174,7 +174,7 @@ const Mappings = Module("mappings", {
}
},
_expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.getMapLeader()),
_expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.mapLeader),
// Return all mappings present in all @modes
_mappingsIterator: function (modes, stack) {
@@ -290,16 +290,13 @@ const Mappings = Module("mappings", {
},
/*
* Returns the map leader string used to replace the special token
* "<Leader>" when user mappings are defined.
*
* @returns {string}
* @property {string} The map leader string used to replace the special
* token "<Leader>" when user mappings are defined.
*/
// FIXME: property
getMapLeader: function () {
let leaderRef = dactyl.variableReference("mapleader");
return leaderRef[0] ? leaderRef[0][leaderRef[1]] : "\\";
},
get mapLeader() dactyl.globalVariables["mapleader"] || "\\",
/** @deprecated */
getMapLeader: function () this.mapLeader,
/**
* Returns whether there is a user-defined mapping <b>cmd</b> for the