mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-29 05:12:28 +01:00
Long awaited augmentation of the :map command. Surrounding code needs cleanup.
--HG-- extra : rebase_source : 6bb2406343f04aff20456e1a9d0cb595f4ec767d
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
|
||||
const Modes = Module("modes", {
|
||||
init: function () {
|
||||
this.modeChars = {};
|
||||
this._main = 1; // NORMAL
|
||||
this._extended = 0; // NONE
|
||||
|
||||
@@ -143,6 +144,11 @@ const Modes = Module("modes", {
|
||||
name: name,
|
||||
disp: disp
|
||||
}, options);
|
||||
if (mode.char) {
|
||||
this.modeChars[mode.char] = this.modeChars[mode.char] || [];
|
||||
this.modeChars[mode.char].push(mode);
|
||||
}
|
||||
|
||||
mode.display = mode.display || function () disp;
|
||||
this._modeMap[name] = mode;
|
||||
this._modeMap[this[name]] = mode;
|
||||
|
||||
Reference in New Issue
Block a user