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

Fix async completion bug.

This commit is contained in:
Kris Maglione
2011-10-10 17:37:27 -04:00
parent cd06d2454f
commit 7508b9f3fd

View File

@@ -1095,8 +1095,7 @@ var CommandLine = Module("commandline", {
}, },
get activeContexts() this.context.contextList get activeContexts() this.context.contextList
.filter(function (c) c.incomplete .filter(function (c) c.items.length || c.incomplete),
|| c.hasItems && c.items.length),
/** /**
* Returns the current completion string relative to the * Returns the current completion string relative to the
@@ -1899,13 +1898,13 @@ var ItemList = Class("ItemList", {
</div> </div>
</e4x>.elements(), </e4x>.elements(),
get itemCount() this.context.allItems.items.length, get itemCount() this.context.contextList.reduce(function (acc, ctxt) acc + ctxt.items.length, 0),
get visible() !this.container.collapsed, get visible() !this.container.collapsed,
set visible(val) this.container.collapsed = !val, set visible(val) this.container.collapsed = !val,
get activeGroups() this.context.contextList get activeGroups() this.context.contextList
.filter(function (c) c.message || c.incomplete || c.items.length) .filter(function (c) c.items.length || c.message || c.incomplete)
.map(this.getGroup, this), .map(this.getGroup, this),
get selected() let (g = this.selectedGroup) g && g.selectedIdx != null get selected() let (g = this.selectedGroup) g && g.selectedIdx != null