Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit bc67c13

Browse files
aymanbagabaskujtimiihoxha
authored andcommitted
fix: tui: use KeyPressMsg instead of KeyMsg
The `tea.KeyMsg` type can match both key presses and releases, which can lead to unexpected behavior in the TUI. Use `tea.KeyPressMsg` explicitly to ensure we match only key presses.
1 parent 9c4a47b commit bc67c13

16 files changed

Lines changed: 25 additions & 476 deletions

File tree

internal/format/spinner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func (m spinnerModel) Init() tea.Cmd {
3131

3232
func (m spinnerModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
3333
switch msg := msg.(type) {
34-
case tea.KeyMsg:
34+
case tea.KeyPressMsg:
3535
m.quitting = true
3636
return m, tea.Quit
3737
case spinner.TickMsg:

0 commit comments

Comments
 (0)