From 6fb5791b25a08e208ad07bce254621434e9c9108 Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Tue, 6 Jan 2015 20:16:02 +0600 Subject: [PATCH] Improve rpc console history behavior https://github.com/bitcoin/bitcoin/pull/4300 --- src/qt/rpcconsole.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 95a45b3..36459f7 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -369,8 +369,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 -- 1.7.1