Add a conditional clause because conditional clauses are awesome.

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

No files matched your search

+2 -1
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);
}