From cb9df41059fa2c48b98ffc96ed2d36a268f1f352 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Sun, 22 Sep 2024 12:34:57 -0700 Subject: [PATCH 1/2] Remove unused function for displaying old help page The last reference to this was removed in dfbd1f3bb07c3834276f980b77fe241f0fcdc866 --- bubble/list/list.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bubble/list/list.go b/bubble/list/list.go index 16296228..40f68850 100644 --- a/bubble/list/list.go +++ b/bubble/list/list.go @@ -964,16 +964,6 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd { return tea.Batch(cmds...) } -func (m *Model) showHelpScreen() tea.Cmd { - helpScreen := help.GetHelpScreen(m.config.EnableNerdFonts) - - command := cli.Less(helpScreen, m.config) - - return tea.ExecProcess(command, func(err error) tea.Msg { - return message.EditorFinishedMsg{Err: err} - }) -} - // View renders the component. func (m *Model) View() string { if m.isOnHelpScreen { From 8dfcf0ab27a4346ec21e1543426eabafa069d3d9 Mon Sep 17 00:00:00 2001 From: apainintheneck Date: Sun, 22 Sep 2024 14:12:49 -0700 Subject: [PATCH 2/2] Clear screen explicitly when exiting the help page This was causing ghosting issues on macOS when using terminal and iTerm2. I'm not entirely sure why this was causing problems in the first place but this heavy handed solution seems to work. --- bubble/list/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bubble/list/list.go b/bubble/list/list.go index 40f68850..8fb08625 100644 --- a/bubble/list/list.go +++ b/bubble/list/list.go @@ -637,7 +637,7 @@ func (m *Model) updateHelpScreen(msg tea.Msg) (*Model, tea.Cmd) { if k := msg.String(); k == "ctrl+c" || k == "q" || k == "esc" || k == "i" || k == "?" { m.isOnHelpScreen = false - return m, nil + return m, tea.ClearScreen } case tea.WindowSizeMsg: