mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-19 18:45:46 +01:00
Fix CompletionContext#allItems in wake of quoting fixes in revision 8ea6242902e4; other small fixes.
This commit is contained in:
@@ -4,7 +4,7 @@ TOP = $(shell pwd)
|
||||
OS = $(shell uname -s)
|
||||
BUILD_DATE = $(shell date "+%Y/%m/%d %H:%M:%S")
|
||||
BASE = $(TOP)/../common
|
||||
GOOGLE_PROJ = pentadactyl-labs
|
||||
GOOGLE_PROJ = dactyl
|
||||
GOOGLE = https://$(GOOGLE_PROJ).googlecode.com/files
|
||||
|
||||
LOCALEDIR = locale
|
||||
|
||||
@@ -344,7 +344,7 @@ const Commands = Module("commands", {
|
||||
let names = array.flatten(Command.parseSpecs(args[0]));
|
||||
dactyl.assert(!names.some(function (name) name in this._exMap && !this._exMap[name].user, this),
|
||||
"E182: Can't replace non-user command: " + args[0]);
|
||||
if (!replace && args[3] && args[3].user)
|
||||
if (!replace || !(args[3] && args[3].user))
|
||||
dactyl.assert(!names.some(function (name) name in this._exMap, this),
|
||||
"Not replacing command " + args[0]);
|
||||
for (let name in values(names))
|
||||
|
||||
@@ -221,6 +221,7 @@ const CompletionContext = Class("CompletionContext", {
|
||||
let prefix = self.value.substring(minStart, context.offset);
|
||||
return context.items.map(function (item) ({
|
||||
text: prefix + item.text,
|
||||
result: prefix + item.result,
|
||||
__proto__: item
|
||||
}));
|
||||
});
|
||||
|
||||
@@ -46,8 +46,11 @@ const JavaScript = Module("javascript", {
|
||||
// Properties aren't visible in an XPCNativeWrapper until
|
||||
// they're accessed.
|
||||
for (let key in properties(this.getKey(obj, "wrappedJSObject"), !toplevel))
|
||||
if (key in obj && !set.has(seen, key))
|
||||
yield key;
|
||||
try {
|
||||
if (key in obj && !set.has(seen, key))
|
||||
yield key;
|
||||
}
|
||||
catch (e) {}
|
||||
},
|
||||
|
||||
objectKeys: function objectKeys(obj, toplevel) {
|
||||
|
||||
@@ -57,6 +57,7 @@ const Util = Module("Util", {
|
||||
if (observers[target])
|
||||
observers[target].call(obj, subject, data);
|
||||
});
|
||||
this.dactyl.dump(String(obj), obj instanceof Ci.nsIObserver);
|
||||
register("addObserver");
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user