chat_text_view.vala: use Enter to insert \n

This commit is contained in:
Xavier Del Campo Romero 2022-04-30 00:31:11 +02:00
parent 59bed3f3c7
commit 1296084aee
1 changed files with 1 additions and 6 deletions

View File

@ -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) {