diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-04-30 00:31:11 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2022-04-30 00:31:11 +0200 |
| commit | 1296084aeeeddfd0ba6e94b0e9ab6dabac3eaa42 (patch) | |
| tree | ac48bec3a954d0a96b498d51d1e9a3073ffc354b /main/src/ui/chat_input | |
| parent | 59bed3f3c7c9e39b7bf04a627539e66db405323f (diff) | |
chat_text_view.vala: use Enter to insert \nsend-button
Diffstat (limited to 'main/src/ui/chat_input')
| -rw-r--r-- | main/src/ui/chat_input/chat_text_view.vala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/main/src/ui/chat_input/chat_text_view.vala b/main/src/ui/chat_input/chat_text_view.vala index 2f8393d2..d6d45e34 100644 --- a/main/src/ui/chat_input/chat_text_view.vala +++ b/main/src/ui/chat_input/chat_text_view.vala @@ -76,12 +76,7 @@ public class ChatTextView : ScrolledWindow { private bool on_text_input_key_press(EventKey event) { if (event.keyval in new uint[]{Key.Return, Key.KP_Enter}) { - if ((event.state & ModifierType.SHIFT_MASK) > 0) { - text_view.buffer.insert_at_cursor("\n", 1); - } else if (text_view.buffer.text.strip() != "") { - send_text(); - edit_history.reset_history(); - } + text_view.buffer.insert_at_cursor("\n", 1); return true; } if (event.keyval == Key.Escape) { |
