mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-05 23:15:46 +01:00
Add file input editing history.
This commit is contained in:
@@ -165,11 +165,11 @@ var RangeFinder = Module("rangefinder", {
|
||||
modes.addMode("FIND_FORWARD", {
|
||||
extended: true,
|
||||
description: "Forward Find mode, active when typing search input"
|
||||
});
|
||||
}, { history: "search" });
|
||||
modes.addMode("FIND_BACKWARD", {
|
||||
extended: true,
|
||||
description: "Backward Find mode, active when typing search input"
|
||||
});
|
||||
}, { history: "search" });
|
||||
},
|
||||
commandline: function (dactyl, modules, window) {
|
||||
const { commandline, modes, rangefinder } = modules;
|
||||
|
||||
@@ -55,7 +55,15 @@ var StoreBase = Class("StoreBase", {
|
||||
this.fireEvent("change", null);
|
||||
},
|
||||
|
||||
remove: function remove() {
|
||||
delete storage.keys[this.name];
|
||||
delete storage[this.name];
|
||||
storage.infoPath.child(this.name).remove(false);
|
||||
},
|
||||
|
||||
save: function () { saveData(this); },
|
||||
|
||||
__iterator__: function () Iterator(this._object)
|
||||
});
|
||||
|
||||
var ArrayStore = Class("ArrayStore", StoreBase, {
|
||||
@@ -99,9 +107,7 @@ var ArrayStore = Class("ArrayStore", StoreBase, {
|
||||
this.fireEvent("change", null);
|
||||
},
|
||||
|
||||
get: function get(index) index >= 0 ? this._object[index] : this._object[this._object.length + index],
|
||||
|
||||
__iterator__: function () Iterator(this._object),
|
||||
get: function get(index) index >= 0 ? this._object[index] : this._object[this._object.length + index]
|
||||
});
|
||||
|
||||
var ObjectStore = Class("ObjectStore", StoreBase, {
|
||||
@@ -135,9 +141,7 @@ var ObjectStore = Class("ObjectStore", StoreBase, {
|
||||
else if (orig != val)
|
||||
this.fireEvent("change", key);
|
||||
return val;
|
||||
},
|
||||
|
||||
__iterator__: function () Iterator(this._object),
|
||||
}
|
||||
});
|
||||
|
||||
var Storage = Module("Storage", {
|
||||
@@ -159,6 +163,8 @@ var Storage = Module("Storage", {
|
||||
this.observers = {};
|
||||
},
|
||||
|
||||
exists: function exists(name) this.infoPath.child(name).exists(),
|
||||
|
||||
newObject: function newObject(key, constructor, params) {
|
||||
if (params == null || !isObject(params))
|
||||
throw Error("Invalid argument type");
|
||||
|
||||
Reference in New Issue
Block a user