aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCozz Lovan <cozzlovan@yahoo.com>2014-06-07 01:22:08 +0200
committerCozz Lovan <cozzlovan@yahoo.com>2014-06-07 13:20:30 +0200
commitdff0e3b9152e66ae569c4f45608677eee11e5351 (patch)
tree58211d087ce14d4040e20804d15ed8f1477feba8
parentdb41541bc2e679a5c98ab380837c985e0252ab43 (diff)
[Qt] Improve rpc console history behavior
-rw-r--r--src/qt/rpcconsole.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 0d3e11f4ac..199050cc57 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -415,8 +415,8 @@ void RPCConsole::on_lineEdit_returnPressed()
{
message(CMD_REQUEST, cmd);
emit cmdRequest(cmd);
- // Truncate history from current position
- history.erase(history.begin() + historyPtr, history.end());
+ // Remove command, if already in history
+ history.removeOne(cmd);
// Append command to history
history.append(cmd);
// Enforce maximum history size