From 1e9a7f42c659332ded8485c996e41696433370ee Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 10 Jan 2009 15:02:40 -0500 Subject: [PATCH] Fix beeping when no completions available. --- common/content/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/content/ui.js b/common/content/ui.js index 0fd3a6b9..c73d085a 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -426,6 +426,8 @@ function CommandLine() //{{{ // a previous context come in. if (idx < 0) idx = this.items.length - 1; + if (this.items.length == 0) + return; this.selected = idx; this.completion = this.items[idx].text; @@ -449,7 +451,7 @@ function CommandLine() //{{{ while (this.tabs.length) { - reverse = this.tabs.pop(); + reverse = this.tabs.shift(); switch (this.wildtype.replace(/.*:/, "")) { case "":