mirror of
https://github.com/charmbracelet/gum.git
synced 2024-11-05 05:46:36 +03: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 New Issue
Block a user