diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-16 14:42:13 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-16 14:42:13 +0200 |
commit | 21fdb26bd47102c87c826c6194f55933a717c970 (patch) | |
tree | 69737039a0ea92824b8fede51358b74688dd4ef6 | |
parent | Lint (diff) | |
download | nheko-21fdb26bd47102c87c826c6194f55933a717c970.tar.xz |
Don't send empty messages
-rw-r--r-- | src/TextInputWidget.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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()); |