From 455a00f6421435dd5de0bfeb041146287b22d684 Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sun, 22 Jun 2008 16:31:32 +0200 Subject: [PATCH] Fixing BR #167 (Key down now puts the content of inputline into the history (doing it irssi's and seezer's way)) --- src/uisupport/inputline.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); -- 2.20.1