mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-07 00:25:46 +01: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);
|
||||
|
||||
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)))
|
||||
module.instance = module;
|
||||
module.init();
|
||||
|
||||
@@ -20,14 +20,14 @@ var RangeFinder = Module("rangefinder", {
|
||||
this.lastFindPattern = "";
|
||||
},
|
||||
|
||||
get commandline() this.modules.commandline,
|
||||
get modes() this.modules.modes,
|
||||
get options() this.modules.options,
|
||||
|
||||
get rangeFind() modules.buffer.localStore.rangeFind,
|
||||
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) {
|
||||
this.CommandMode(mode).open();
|
||||
|
||||
@@ -200,9 +200,9 @@ var RangeFinder = Module("rangefinder", {
|
||||
|
||||
get prompt() this.mode === modules.modes.FIND_BACKWARD ? "?" : "/",
|
||||
|
||||
onCancel: this.closure.onCancel,
|
||||
onChange: this.closure.onChange,
|
||||
onSubmit: this.closure.onSubmit
|
||||
get onCancel() modules.rangefinder.closure.onCancel,
|
||||
get onChange() modules.rangefinder.closure.onChange,
|
||||
get onSubmit() modules.rangefinder.closure.onSubmit
|
||||
});
|
||||
},
|
||||
mappings: function (dactyl, modules, window) {
|
||||
|
||||
@@ -277,7 +277,11 @@ var Overlay = Module("Overlay", {
|
||||
});
|
||||
});
|
||||
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].push(function () {
|
||||
// util.dump("INIT: " + mod.constructor.className + ":" + name);
|
||||
|
||||
Reference in New Issue
Block a user