From 21fdb26bd47102c87c826c6194f55933a717c970 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Thu, 16 Nov 2017 14:42:13 +0200 Subject: Don't send empty messages --- src/TextInputWidget.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TextInputWidget.cc b/src/TextInputWidget.cc index ad053ea3..d71769f4 100644 --- a/src/TextInputWidget.cc +++ b/src/TextInputWidget.cc @@ -133,6 +133,9 @@ FilteredTextEdit::minimumSizeHint() const void FilteredTextEdit::submit() { + if (toPlainText().trimmed().isEmpty()) + return; + if (true_history_.size() == INPUT_HISTORY_SIZE) true_history_.pop_back(); true_history_.push_front(toPlainText()); -- cgit 1.4.1