diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 84082d1e..76db2f82 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -1642,7 +1642,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { bang: true, completer: function (context) { context.ignoreCase = true; - return completion.dialog(context); + completion.dialog(context); } }); diff --git a/common/modules/base.jsm b/common/modules/base.jsm index efdbd106..9e04c492 100644 --- a/common/modules/base.jsm +++ b/common/modules/base.jsm @@ -758,6 +758,7 @@ Class.memoize = function memoize(getter) this.get = function replace() let (obj = this.instance || this) ( Class.replaceProperty(obj, key, null), Class.replaceProperty(obj, key, getter.call(this, key))) + this.set = function replace(val) Class.replaceProperty(this.instance || this, val); } }); @@ -1246,6 +1247,9 @@ update(iter, { * given predicate. */ nth: function nth(iter, pred, n, self) { + if (typeof pred === "number") + [pred, n] = [function () true, pred]; // Hack. + for (let elem in iter) if (pred.call(self, elem) && n-- === 0) return elem;