From 1597664119a4b3660886f83f81e6ad91a0d7062c Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 29 Apr 2016 13:33:37 +0100 Subject: Vomnibar, on tab: require there to be completions. Do the following: - `b`, `Tab` The Vomnibar crashes. The problem is that we're advancing the selection even though there are no suggestions available. Here, we require there to be a suggestion or suggestions before advancing the selection. --- pages/vomnibar.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/vomnibar.coffee b/pages/vomnibar.coffee index 449c0bac..95ef8151 100644 --- a/pages/vomnibar.coffee +++ b/pages/vomnibar.coffee @@ -136,7 +136,7 @@ class VomnibarUI @input.value.trim().length == 0 @seenTabToOpenCompletionList = true @update true - else + else if 0 < @completions.length @selection += 1 @selection = @initialSelectionValue if @selection == @completions.length @updateSelection() -- cgit v1.2.3