From 4f9875a8bbf7a6688b1262276fa3e72b5d770d56 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Mon, 29 Aug 2022 08:04:54 +0200 Subject: [PATCH] fix(font): do not crash on enter relates to #2690 --- src/font/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/font/cli.go b/src/font/cli.go index 133c1bdf..02cb48b1 100644 --- a/src/font/cli.go +++ b/src/font/cli.go @@ -166,6 +166,9 @@ func (m *main) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, tea.Quit case "enter": + if len(m.fontname) != 0 { + return m, nil + } var font *Asset var ok bool if font, ok = m.list.SelectedItem().(*Asset); !ok {