X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fmultilineedit.cpp;h=9029f02f4f87c2d2c883ab0348fde5e7f44bbb2f;hb=18cf07f983e6213e0b5bfd66f0ad016a731951e4;hp=699d4ec825eac48b46b122340146da61df96e0a9;hpb=09d19fe065125ccc6e406fa325d675387788ab3c;p=quassel.git diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 699d4ec8..9029f02f 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -231,8 +231,11 @@ void MultiLineEdit::keyPressEvent(QKeyEvent *event) { # endif #endif - if(_mode == SingleLine) + if(_mode == SingleLine) { + event->accept(); + on_returnPressed(); return; + } #ifdef HAVE_KDE KTextEdit::keyPressEvent(event); #else @@ -310,6 +313,8 @@ void MultiLineEdit::on_returnPressed(const QString & text) { } reset(); tempHistory.clear(); + } else { + emit noTextEntered(); } } @@ -358,6 +363,7 @@ void MultiLineEdit::on_textChanged() { on_documentHeightChanged(_lastDocumentHeight); } updateSizeHint(); + ensureCursorVisible(); } void MultiLineEdit::on_documentHeightChanged(qreal) {