mirror of
https://github.com/taigrr/bubbletea.git
synced 2026-04-02 02:59:09 -07:00
Fix a mouse example
This commit is contained in:
committed by
Christian Rocha
parent
116a0cfb8f
commit
892bebd617
@@ -35,7 +35,7 @@ func (m model) Init() tea.Cmd {
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
if msg.Type == tea.KeyCtrlC || (msg.Type == tea.KeyRune && msg.Rune == 'q') {
|
||||
if s := msg.String(); s == "ctrl+c" || s == "q" {
|
||||
return m, tea.Quit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user