1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:37:58 +01:00

Fix :dia completion.

This commit is contained in:
Kris Maglione
2011-01-28 10:10:10 -05:00
parent 227fff2a04
commit 5cba6cbc77
2 changed files with 5 additions and 1 deletions

View File

@@ -1642,7 +1642,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
bang: true, bang: true,
completer: function (context) { completer: function (context) {
context.ignoreCase = true; context.ignoreCase = true;
return completion.dialog(context); completion.dialog(context);
} }
}); });

View File

@@ -758,6 +758,7 @@ Class.memoize = function memoize(getter)
this.get = function replace() let (obj = this.instance || this) ( this.get = function replace() let (obj = this.instance || this) (
Class.replaceProperty(obj, key, null), Class.replaceProperty(obj, key, null),
Class.replaceProperty(obj, key, getter.call(this, key))) 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. * given predicate.
*/ */
nth: function nth(iter, pred, n, self) { nth: function nth(iter, pred, n, self) {
if (typeof pred === "number")
[pred, n] = [function () true, pred]; // Hack.
for (let elem in iter) for (let elem in iter)
if (pred.call(self, elem) && n-- === 0) if (pred.call(self, elem) && n-- === 0)
return elem; return elem;