1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-08 03:14:13 +01:00

Add a conditional clause because conditional clauses are awesome.

This commit is contained in:
Kris Maglione
2011-10-03 22:52:22 -04:00
parent 54357e1f22
commit 1afa56335d
2 changed files with 10 additions and 6 deletions

View File

@@ -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);
}

View File

@@ -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"]) {