The q key also quits in the pager example

This commit is contained in:
Christian Rocha
2020-11-08 21:25:52 -05:00
parent 5d34c88692
commit 28db8b465a

View File

@@ -88,7 +88,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
// Ctrl+c exits
if msg.Type == tea.KeyCtrlC {
if k := msg.String(); k == "ctrl+c" || k == "q" {
return m, tea.Quit
}