bubbletea/examples/suspend
Carlos Alexandro Becker cb93959823
feat(SIGINT): better handle interrupts (#1255)
* feat(SIGINT): better handle interrupts

This PR introduces `Interrupt()`, `InterruptMsg{}`, and
`ErrInterrupted`.

Users can still handle "ctrl+c" as before, but instead of return
`tea.Quit`, they can return `tea.Interrupt`.

Later on, they can `errors.If(err, tea.ErrInterrupted)` and
`os.Exit(130)` if they want to.

* chore: fix unrelated typo

it was bothering me
2024-12-02 09:14:20 -03:00
..
main.go feat(SIGINT): better handle interrupts (#1255) 2024-12-02 09:14:20 -03:00