mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-29 15:33:34 +02:00
Fix some more unfortunate bugs. Yay tests.
This commit is contained in:
@@ -917,6 +917,7 @@ Module.INIT = {
|
|||||||
module = objs[i] = Object.create(module);
|
module = objs[i] = Object.create(module);
|
||||||
|
|
||||||
modules.jsmodules[this.constructor.className] = module;
|
modules.jsmodules[this.constructor.className] = module;
|
||||||
|
util.dump(" ====================================== INIT " + this.constructor.className + " ====================================== ");
|
||||||
locals.reverse().forEach(function (fn, i) update(objs[i], fn.apply(module, args)))
|
locals.reverse().forEach(function (fn, i) update(objs[i], fn.apply(module, args)))
|
||||||
module.instance = module;
|
module.instance = module;
|
||||||
module.init();
|
module.init();
|
||||||
|
|||||||
@@ -20,14 +20,14 @@ var RangeFinder = Module("rangefinder", {
|
|||||||
this.lastFindPattern = "";
|
this.lastFindPattern = "";
|
||||||
},
|
},
|
||||||
|
|
||||||
get commandline() this.modules.commandline,
|
|
||||||
get modes() this.modules.modes,
|
|
||||||
get options() this.modules.options,
|
|
||||||
|
|
||||||
get rangeFind() modules.buffer.localStore.rangeFind,
|
get rangeFind() modules.buffer.localStore.rangeFind,
|
||||||
set rangeFind(val) modules.buffer.localStore.rangeFind = val
|
set rangeFind(val) modules.buffer.localStore.rangeFind = val
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
get commandline() this.modules.commandline,
|
||||||
|
get modes() this.modules.modes,
|
||||||
|
get options() this.modules.options,
|
||||||
|
|
||||||
openPrompt: function (mode) {
|
openPrompt: function (mode) {
|
||||||
this.CommandMode(mode).open();
|
this.CommandMode(mode).open();
|
||||||
|
|
||||||
@@ -200,9 +200,9 @@ var RangeFinder = Module("rangefinder", {
|
|||||||
|
|
||||||
get prompt() this.mode === modules.modes.FIND_BACKWARD ? "?" : "/",
|
get prompt() this.mode === modules.modes.FIND_BACKWARD ? "?" : "/",
|
||||||
|
|
||||||
onCancel: this.closure.onCancel,
|
get onCancel() modules.rangefinder.closure.onCancel,
|
||||||
onChange: this.closure.onChange,
|
get onChange() modules.rangefinder.closure.onChange,
|
||||||
onSubmit: this.closure.onSubmit
|
get onSubmit() modules.rangefinder.closure.onSubmit
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mappings: function (dactyl, modules, window) {
|
mappings: function (dactyl, modules, window) {
|
||||||
|
|||||||
@@ -277,7 +277,11 @@ var Overlay = Module("Overlay", {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
defineModule.modules.forEach(function (mod) {
|
defineModule.modules.forEach(function (mod) {
|
||||||
Object.keys(mod.INIT).forEach(function (name) {
|
let names = set(Object.keys(mod.INIT));
|
||||||
|
if ("init" in mod.INIT)
|
||||||
|
set.add(names, "init");
|
||||||
|
|
||||||
|
keys(names).forEach(function (name) {
|
||||||
deferredInit[name] = deferredInit[name] || [];
|
deferredInit[name] = deferredInit[name] || [];
|
||||||
deferredInit[name].push(function () {
|
deferredInit[name].push(function () {
|
||||||
// util.dump("INIT: " + mod.constructor.className + ":" + name);
|
// util.dump("INIT: " + mod.constructor.className + ":" + name);
|
||||||
|
|||||||
Reference in New Issue
Block a user