mirror of
https://github.com/charmbracelet/gum
synced 2024-06-03 06:12:19 +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) {
|
switch msg := msg.(type) {
|
||||||
case tea.KeyMsg:
|
case tea.KeyMsg:
|
||||||
switch msg.Type {
|
switch msg.Type {
|
||||||
case tea.KeyEscape, tea.KeyCtrlC:
|
case tea.KeyEscape, tea.KeyCtrlC, tea.KeyCtrlD:
|
||||||
m.quitting = true
|
m.quitting = true
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue