mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 15:07:57 +01:00
Use null rather than -1 for specifying a non-existent mode display function.
--HG-- extra : rebase_source : 1709c70c9e792c2f52009728fc7cd53970f8a9ae
This commit is contained in:
@@ -30,7 +30,7 @@ const Modes = Module("modes", {
|
||||
this.boundProperties = {};
|
||||
|
||||
// main modes, only one should ever be active
|
||||
this.addMode("NORMAL", { char: "n", display: -1 });
|
||||
this.addMode("NORMAL", { char: "n", display: null });
|
||||
this.addMode("INSERT", { char: "i", input: true });
|
||||
this.addMode("VISUAL", { char: "v", display: function () "VISUAL" + (this._extended & modes.LINE ? " LINE" : "") });
|
||||
this.addMode("COMMAND_LINE", { char: "c", input: true });
|
||||
@@ -118,7 +118,8 @@ const Modes = Module("modes", {
|
||||
this.modeChars[mode.char].push(mode);
|
||||
}
|
||||
|
||||
mode.display = mode.display || function () disp;
|
||||
if (mode.display !== null)
|
||||
mode.display = function () disp;
|
||||
this._modeMap[name] = mode;
|
||||
this._modeMap[this[name]] = mode;
|
||||
if (!extended)
|
||||
|
||||
Reference in New Issue
Block a user