Skip to content

Commit

Permalink
Info modal closes with "i"
Browse files Browse the repository at this point in the history
Pressing "i" when info modal is open will now close the info modal.
  • Loading branch information
Jeremy-Neville authored and dundee committed Nov 9, 2021
1 parent cd6274a commit 1733548
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tui/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ func (ui *UI) keyPressed(key *tcell.EventKey) *tcell.EventKey {
return nil
}
}

if key.Rune() == 'i' {
if ui.pages.HasPage("info") {
ui.pages.RemovePage("info")
_, page := ui.pages.GetFrontPage()
ui.app.SetFocus(page)
return nil
}
}

switch key.Rune() {
case 'Q':
Expand Down

0 comments on commit 1733548

Please sign in to comment.