Skip to content
Myr

Fix a mouse example

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

authored by SuperPaintman · committed by Christian Rocha · parent 116a0cf · 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/mouse/main.go+1 added-1 removed
33 unmodified lines
3435func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {36 switch msg := msg.(type) {37 case tea.KeyMsg:38 if msg.Type == tea.KeyCtrlC || (msg.Type == tea.KeyRune && msg.Rune == 'q') {38 if s := msg.String(); s == "ctrl+c" || s == "q" {39 return m, tea.Quit40 }4142 case tea.MouseMsg:
17 unmodified lines