mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 23:24:12 +01:00
Make 'mapleader' an option and fix the help fragment scrolling issue.
This commit is contained in:
@@ -174,7 +174,7 @@ const Mappings = Module("mappings", {
|
||||
}
|
||||
},
|
||||
|
||||
_expandLeader: function (keyString) keyString.replace(/<Leader>/i, mappings.mapLeader),
|
||||
_expandLeader: function (keyString) keyString.replace(/<Leader>/i, options["mapleader"]),
|
||||
|
||||
// Return all mappings present in all @modes
|
||||
_mappingsIterator: function (modes, stack) {
|
||||
@@ -289,15 +289,6 @@ const Mappings = Module("mappings", {
|
||||
return matches;
|
||||
},
|
||||
|
||||
/*
|
||||
* @property {string} The map leader string used to replace the special
|
||||
* token "<Leader>" when user mappings are defined.
|
||||
*/
|
||||
get mapLeader() dactyl.globalVariables["mapleader"] || "\\",
|
||||
/** @deprecated */
|
||||
getMapLeader: function () this.mapLeader,
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether there is a user-defined mapping <b>cmd</b> for the
|
||||
* specified <b>mode</b>.
|
||||
@@ -589,6 +580,11 @@ const Mappings = Module("mappings", {
|
||||
this._main[mode] = [];
|
||||
this._user[mode] = [];
|
||||
}
|
||||
},
|
||||
options: function () {
|
||||
options.add(["mapleader", "ml"],
|
||||
"Defines the replacement keys for the <Leader> pseudo-key",
|
||||
"string", "\\");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user