From 2be37339320aaa2067210f80e723b2a38b4bb1c4 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Sun, 10 Mar 2024 22:50:35 +0100 Subject: [PATCH] Use ? to exit help as well --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index b008a14..3a3d715 100644 --- a/main.go +++ b/main.go @@ -360,7 +360,7 @@ func (m *model) handleHelpKey(msg tea.Msg) (tea.Model, tea.Cmd) { var cmd tea.Cmd if msg, ok := msg.(tea.KeyMsg); ok { switch { - case key.Matches(msg, keyMap.Quit): + case key.Matches(msg, keyMap.Quit), key.Matches(msg, keyMap.Help): m.showHelp = false } } @@ -658,7 +658,7 @@ func (m *model) scrollIntoView() { func (m *model) View() string { if m.showHelp { - statusBar := flex(m.termWidth, ": press q or esc to close help", "") + statusBar := flex(m.termWidth, ": press q or ? to close help", "") return m.help.View() + "\n" + string(currentTheme.StatusBar([]byte(statusBar))) }