From: Marcus Eggenberger Date: Sun, 22 Jun 2008 14:31:32 +0000 (+0200) Subject: Fixing BR #167 (Key down now puts the content of inputline into the history (doing... X-Git-Tag: 0.3.0~354 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=455a00f6421435dd5de0bfeb041146287b22d684 Fixing BR #167 (Key down now puts the content of inputline into the history (doing it irssi's and seezer's way)) --- diff --git a/src/uisupport/inputline.cpp b/src/uisupport/inputline.cpp index 31ec3991..6ea156aa 100644 --- a/src/uisupport/inputline.cpp +++ b/src/uisupport/inputline.cpp @@ -41,7 +41,11 @@ void InputLine::keyPressEvent(QKeyEvent * event) { } else if(event->key() == Qt::Key_Down) { if(idx < history.count()) idx++; if(idx < history.count()) setText(history[idx]); - else setText(""); + else if(!text().isEmpty()) { + history << text(); + idx = history.count(); + setText(""); + } event->accept(); } else if(event->key() == Qt::Key_Select) { // for Qtopia emit returnPressed();