Fix inserting a newline on shift-enter.

Return false from key-press-event to propagate event to a default
handler that will insert a newline into the entry widget.
This commit is contained in:
Tomasz Miąsko 2017-01-24 12:08:06 +01:00
parent 179777239e
commit 18a3258cb5
1 changed files with 1 additions and 1 deletions

View File

@ -680,7 +680,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
elif event.keyval == Gdk.KEY_Return or \ elif event.keyval == Gdk.KEY_Return or \
event.keyval == Gdk.KEY_KP_Enter: # ENTER event.keyval == Gdk.KEY_KP_Enter: # ENTER
if event_state & Gdk.ModifierType.SHIFT_MASK: if event_state & Gdk.ModifierType.SHIFT_MASK:
return True return False
message_textview = widget message_textview = widget
message_buffer = message_textview.get_buffer() message_buffer = message_textview.get_buffer()
start_iter, end_iter = message_buffer.get_bounds() start_iter, end_iter = message_buffer.get_bounds()