1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-19 21:57:59 +01:00

Prepare for merge with testing branch.

This commit is contained in:
Kris Maglione
2010-08-28 15:47:45 -04:00
parent 0c6a7b178f
commit 5632e14721
25 changed files with 903 additions and 801 deletions

View File

@@ -139,7 +139,7 @@ const Modes = Module("modes", {
options = extended;
extended = false;
}
this._modeMap[name] = this._modeMap[this[name]] = util.extend({
let mode = util.extend({
extended: extended,
count: true,
input: false,
@@ -147,11 +147,12 @@ const Modes = Module("modes", {
name: name,
disp: disp
}, options);
this._modeMap[name].display = this._modeMap[name].display || function () disp;
mode.display = mode.display || function () disp;
this._modeMap[name] = mode;
this._modeMap[this[name]] = mode;
if (!extended)
this._mainModes.push(this[name]);
if ("mappings" in modules)
mappings.addMode(this[name]);
dactyl.triggerObserver("mode-add", mode);
},
getMode: function (name) this._modeMap[name],