aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChatWindow.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ChatWindow.cpp b/src/ChatWindow.cpp
index f7cc5e2..a991e57 100644
--- a/src/ChatWindow.cpp
+++ b/src/ChatWindow.cpp
@@ -169,8 +169,11 @@ namespace dchat
{
if((event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter) && !(event->state & Gdk::SHIFT_MASK))
{
- currentRoom->publishMessage(chatInput.get_buffer()->get_text());
- chatInput.get_buffer()->set_text("");
+ if(chatInput.get_editable())
+ {
+ currentRoom->publishMessage(chatInput.get_buffer()->get_text());
+ chatInput.get_buffer()->set_text("");
+ }
return true;
}
return false;