Fix empty autocomplete crash

mine
David Němec 2020-03-24 18:30:39 +01:00
parent c6a8477e5b
commit 9927848fb0
No known key found for this signature in database
GPG Key ID: B1064EFFFD11AA75
1 changed files with 6 additions and 1 deletions

View File

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