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

Fix Options#op

This commit is contained in:
Kris Maglione
2008-11-26 08:38:12 +00:00
parent 3a85f642e2
commit d35e3a0c8e
3 changed files with 18 additions and 15 deletions

View File

@@ -57,12 +57,12 @@ function CompletionContext(editor, name, offset)
self.keys = util.cloneObject(parent.keys);
["compare", "editor", "filterFunc", "keys", "process", "quote", "title", "top"].forEach(function (key)
self[key] = parent[key]);
if (self != this)
return self;
["contextList", "onUpdate", "selectionTypes", "tabPressed", "updateAsync", "value"].forEach(function (key) {
self.__defineGetter__(key, function () this.top[key]);
self.__defineSetter__(key, function (val) this.top[key] = val);
});
if (self != this)
return self;
}
else
{
@@ -95,12 +95,8 @@ function CompletionContext(editor, name, offset)
this.keys = { text: 0, description: 1, icon: "icon" };
this.offset = offset || 0;
this.onUpdate = function () true;
this.process = [];
this.tabPressed = false;
this.title = ["Completions"];
this.top = this;
this.__defineGetter__("incomplete", function () this.contextList.some(function (c) c.parent && c.incomplete));
this.selectionTypes = {};
this.reset();
}
this.name = name || "";
@@ -390,8 +386,10 @@ CompletionContext.prototype = {
this.highlight(0, 0, type);
this.contextList = [];
this.offset = 0;
this.process = [];
this.selectionTypes = {};
this.tabPressed = false;
this.title = ["Completions"];
this.updateAsync = false;
this.value = this.editor ? this.editor.rootElement.textContent : this._value;
//for (let key in (k for ([k, v] in Iterator(self.contexts)) if (v.offset > this.caret)))

View File

@@ -1095,17 +1095,21 @@ const liberator = (function () //{{{
{
if (Components.utils.reportError)
Components.utils.reportError(error);
let obj = {
toString: function () error.toString(),
stack: <>{error.stack.replace(/^/mg, "\t")}</>
};
for (let [k, v] in Iterator(error))
try
{
if (!(k in obj))
obj[k] = v;
let obj = {
toString: function () error.toString(),
stack: <>{error.stack.replace(/^/mg, "\t")}</>
};
for (let [k, v] in Iterator(error))
{
if (!(k in obj))
obj[k] = v;
}
liberator.dump(obj);
liberator.dump("");
}
liberator.dump(obj);
liberator.dump("");
catch (e) {}
},
restart: function ()

View File

@@ -186,6 +186,7 @@ Option.prototype = {
op: function (operator, values, scope, invert)
{
let newValue = null;
let self = this;
switch (this.type)
{