From 7508b9f3fdc731dfa1ff549f5d54801349c15a18 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 10 Oct 2011 17:37:27 -0400 Subject: [PATCH] Fix async completion bug. --- common/content/commandline.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/content/commandline.js b/common/content/commandline.js index 78f99e85..482b8044 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -1095,8 +1095,7 @@ var CommandLine = Module("commandline", { }, get activeContexts() this.context.contextList - .filter(function (c) c.incomplete - || c.hasItems && c.items.length), + .filter(function (c) c.items.length || c.incomplete), /** * Returns the current completion string relative to the @@ -1899,13 +1898,13 @@ var ItemList = Class("ItemList", { .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, set visible(val) this.container.collapsed = !val, 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), get selected() let (g = this.selectedGroup) g && g.selectedIdx != null