From aec65c42f57648ab2d2715fe49851f09647d6271 Mon Sep 17 00:00:00 2001 From: Ayman Bagabas Date: Tue, 28 Oct 2025 18:39:03 -0400 Subject: [PATCH] fix(ui): don't use separate showFullHelp field --- internal/ui/model/ui.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/ui/model/ui.go b/internal/ui/model/ui.go index f157efce1df8091a9b647bef6172ba47e4095098..eec74799774e91b132123bb3e467368ab98de103 100644 --- a/internal/ui/model/ui.go +++ b/internal/ui/model/ui.go @@ -25,8 +25,7 @@ type UI struct { app *app.App com *common.Common - state uiState - showFullHelp bool + state uiState keyMap KeyMap @@ -74,8 +73,7 @@ func (m *UI) Update(msg tea.Msg) (tea.Model, tea.Cmd) { cmds = append(cmds, m.editor.Blur()) } case key.Matches(msg, m.keyMap.Help): - m.showFullHelp = !m.showFullHelp - m.help.ShowAll = m.showFullHelp + m.help.ShowAll = !m.help.ShowAll m.updateLayout(m.layout.area.Dx(), m.layout.area.Dy()) case key.Matches(msg, m.keyMap.Quit): if !m.dialog.ContainsDialog(dialog.QuitDialogID) { @@ -218,7 +216,7 @@ func (m *UI) updateLayout(w, h int) { if m.dialog.HasDialogs() && len(m.dialog.FullHelp()) > 0 && len(m.dialog.ShortHelp()) > 0 { helpKeyMap = m.dialog } - if m.showFullHelp { + if m.help.ShowAll { for _, row := range helpKeyMap.FullHelp() { helpHeight = max(helpHeight, len(row)) }