1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-29 06:32:26 +01:00

List links in :hi output; provide current/default value completion.

This commit is contained in:
Kris Maglione
2010-12-30 00:46:28 -05:00
parent 1dd8efea4f
commit 4d47da9102
2 changed files with 15 additions and 4 deletions

View File

@@ -643,7 +643,7 @@ var CompletionContext = Class("CompletionContext", {
* interpreted as a method to access on *self*.
*/
fork: function fork(name, offset, self, completer) {
if (typeof completer == "string")
if (isString(completer))
completer = self[completer];
let context = CompletionContext(this, name, offset);
if (this.contextList.indexOf(context) < 0)
@@ -654,7 +654,9 @@ var CompletionContext = Class("CompletionContext", {
else if (completer) {
let res = completer.apply(self || this, [context].concat(Array.slice(arguments, fork.length)));
if (res && !isArray(res) && !isArray(res.__proto__))
return [k for (k in res)];
res = [k for (k in res)];
if (res)
context.completions = res;
return res;
}
if (completer)