Skip to content

Commit 3f3b56e

Browse files
committed
"enter" sends the message
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
1 parent a7c32fb commit 3f3b56e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/tui/components/editor/editor.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (e *editor) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
6565
return e, nil
6666
case tea.KeyPressMsg:
6767
switch msg.String() {
68-
case "ctrl+enter":
68+
case "enter":
6969
if !e.textarea.Focused() {
7070
return e, nil
7171
}
@@ -133,13 +133,9 @@ func (e *editor) IsFocused() bool {
133133
// Bindings returns key bindings for the component
134134
func (e *editor) Bindings() []key.Binding {
135135
return []key.Binding{
136-
key.NewBinding(
137-
key.WithKeys("ctrl+enter"),
138-
key.WithHelp("ctrl+enter", "send"),
139-
),
140136
key.NewBinding(
141137
key.WithKeys("enter"),
142-
key.WithHelp("enter", "new line"),
138+
key.WithHelp("enter", "send"),
143139
),
144140
}
145141
}

0 commit comments

Comments
 (0)