mirror of
https://github.com/sst/opencode.git
synced 2025-08-04 13:30:52 +00:00
make ctrl+d quit too, just like shells (#105)
This commit is contained in:
parent
2ea0399aa7
commit
adb54521b4
1 changed files with 5 additions and 0 deletions
|
@ -124,6 +124,11 @@ func (m *editorComponent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
case "ctrl+d":
|
||||
if m.textarea.Value() != "" {
|
||||
return m, nil
|
||||
}
|
||||
return m, tea.Quit
|
||||
case "shift+enter":
|
||||
value := m.textarea.Value()
|
||||
m.textarea.SetValue(value + "\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue