mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:57:58 +01:00
Deal with default values when providing command option completion. Closes issue #146.
This commit is contained in:
@@ -760,7 +760,7 @@ const Commands = Module("commands", {
|
|||||||
function matchOpts(arg) {
|
function matchOpts(arg) {
|
||||||
// Push possible option matches into completions
|
// Push possible option matches into completions
|
||||||
if (complete && !onlyArgumentsRemaining)
|
if (complete && !onlyArgumentsRemaining)
|
||||||
completeOpts = options.filter(function (opt) opt.multiple || !(opt.names[0] in args));
|
completeOpts = options.filter(function (opt) opt.multiple || !set.has(args, opt.names[0]));
|
||||||
}
|
}
|
||||||
function resetCompletions() {
|
function resetCompletions() {
|
||||||
completeOpts = null;
|
completeOpts = null;
|
||||||
|
|||||||
@@ -364,6 +364,7 @@ const Events = Module("events", {
|
|||||||
if (target instanceof Document)
|
if (target instanceof Document)
|
||||||
target = target.documentElement;
|
target = target.documentElement;
|
||||||
dactyl.assert(target);
|
dactyl.assert(target);
|
||||||
|
|
||||||
// This causes a crash on Gecko<2.0, it seems.
|
// This causes a crash on Gecko<2.0, it seems.
|
||||||
target.ownerDocument.defaultView
|
target.ownerDocument.defaultView
|
||||||
.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
|
.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
|
||||||
|
|||||||
Reference in New Issue
Block a user