mirror of
https://github.com/charmbracelet/gum
synced 2024-05-20 15:16:42 +02:00
fix(write): Add CtrlD as a quitting key
Add tea.KeyCtrlD as a way to quit the write as it signifies EOF.
This commit is contained in:
parent
66ef277036
commit
3e8153e140
|
@ -21,7 +21,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
switch msg.Type {
|
||||
case tea.KeyEscape, tea.KeyCtrlC:
|
||||
case tea.KeyEscape, tea.KeyCtrlC, tea.KeyCtrlD:
|
||||
m.quitting = true
|
||||
return m, tea.Quit
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue