From 9927848fb02c7f0a18c7e604118ca9f9c237e5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C4=9Bmec?= Date: Tue, 24 Mar 2020 18:30:39 +0100 Subject: [PATCH] Fix empty autocomplete crash --- internal/ui/command.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/ui/command.go b/internal/ui/command.go index 9fc87c65..3586d622 100644 --- a/internal/ui/command.go +++ b/internal/ui/command.go @@ -26,7 +26,12 @@ type Command struct { // NewCommand returns a new command view. func NewCommand(styles *config.Styles, m *model.FishBuff) *Command { - c := Command{styles: styles, TextView: tview.NewTextView(), model: m} + c := Command{ + styles: styles, + TextView: tview.NewTextView(), + model: m, + suggestionIndex: -1, + } c.SetWordWrap(true) c.SetWrap(true) c.SetDynamicColors(true)