Skip to content
Myr

chore(examples): views: change KeyMsg to KeyPressMsg in Update function (#1611)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by jjpinto · committed by GitHub · parent d1ec982 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:examples/views/main.go+1 added-1 removed
80 unmodified lines
8182// Main update function.83func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {84 // Make sure these keys always quit85 if msg, ok := msg.(tea.KeyMsg); ok {85 if msg, ok := msg.(tea.KeyPressMsg); ok {86 k := msg.String()87 if k == "q" || k == "esc" || k == "ctrl+c" {88 m.Quitting = true89 return m, tea.Quit
186 unmodified lines