diff options
| author | Paul Bütow <1224732+snonux@users.noreply.github.com> | 2025-06-20 21:29:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-20 21:29:15 +0300 |
| commit | fe915c0c6eb7612bf645f55a99ac218df0e73ae8 (patch) | |
| tree | ce0865090c0b70fb1bcea8f4a727ca3c940c7d3f | |
| parent | 6d632ae7b7ce137b125e6687873b7d76edc82c40 (diff) | |
| parent | ef5d89cc81b71e84a742b2281e35f645e021bd88 (diff) | |
Merge pull request #46 from snonux/codex/fix-fireworks-on-exit-with-q-key
Fix fireworks exit by ignoring leftover key
| -rw-r--r-- | internal/ui/fireworks.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/ui/fireworks.go b/internal/ui/fireworks.go index c902a67..8442541 100644 --- a/internal/ui/fireworks.go +++ b/internal/ui/fireworks.go @@ -9,10 +9,11 @@ import ( ) type fwModel struct { - width int - height int - start time.Time - fws []firework + width int + height int + start time.Time + fws []firework + ignoreFirstKey bool } type firework struct { @@ -66,6 +67,10 @@ func (m fwModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } return m, tick() case tea.KeyMsg: + if !m.ignoreFirstKey { + m.ignoreFirstKey = true + return m, nil + } return m, tea.Quit } return m, nil |
