1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 08:07:59 +01:00

Serialize :loadplugins command so that options and commands defined by plugins work properly by default.

This commit is contained in:
Kris Maglione
2010-12-22 23:33:57 -05:00
parent 8d9c2cddc0
commit 6cb1c1d659
5 changed files with 37 additions and 14 deletions

View File

@@ -296,6 +296,7 @@ const Command = Class("Command", {
* invocation which should be restored on subsequent @dactyl startups.
*/
serialize: null,
serialGroup: 50,
/**
* @property {number} If this command takes another ex command as an
* argument, the index of that argument. Used in determining whether to
@@ -447,7 +448,7 @@ const Commands = Module("commands", {
/** @property {Iterator(Command)} @private */
__iterator__: function () {
let sorted = this._exCommands.sort(function (a, b) a.name > b.name);
let sorted = this._exCommands.sort(function (a, b) a.serialGroup - b.serialGroup || a.name > b.name);
return array.iterValues(sorted);
},