diff --git a/common/content/commandline.js b/common/content/commandline.js index d77c5077..d7a1dee1 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -1208,7 +1208,8 @@ var CommandLine = Module("commandline", { else if (!this.waiting) { let cursor = this.selected; if (cursor && cursor[0] == context) { - if (cursor[1] >= context.items.length) { + if (cursor[1] >= context.items.length + || this.completion != context.items[cursor[1]].result) { this.selected = null; this.itemList.select(null); } diff --git a/common/modules/config.jsm b/common/modules/config.jsm index 75c854fe..fbcbcea6 100644 --- a/common/modules/config.jsm +++ b/common/modules/config.jsm @@ -259,11 +259,14 @@ var ConfigBase = Class("ConfigBase", { } function processJar(file) { let jar = services.ZipReader(file); - if (jar) { - if (jar.hasEntry("chrome.manifest")) - process(File.readStream(jar.getInputStream("chrome.manifest"))); - jar.close(); - } + if (jar) + try { + if (jar.hasEntry("chrome.manifest")) + process(File.readStream(jar.getInputStream("chrome.manifest"))); + } + finally { + jar.close(); + } } for each (let dir in ["UChrm", "AChrom"]) {