Skip to content

Commit

Permalink
menu: fix help not toggling correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Miller committed Mar 15, 2024
1 parent 537d28a commit ded6e70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion examples/deeper/demo.tape
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ Enter
Sleep 2s
Enter
Sleep 4s

2 changes: 1 addition & 1 deletion menu/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (k KeyMap) FullHelp() [][]key.Binding {

func (m Model) handleKeyMsg(keyMsg tea.KeyMsg, msg tea.Msg) (tea.Model, tea.Cmd) {

if m.help.ShowAll {
if m.help.ShowAll && !key.Matches(keyMsg, DefaultKeyMap.Help) {
m.help.ShowAll = false // toggle help view
switch { //override escape to only close help
case keyMsg.String() == tea.KeyEscape.String():
Expand Down

0 comments on commit ded6e70

Please sign in to comment.