Merge pull request #4300

dff0e3b [Qt] Improve rpc console history behavior (Cozz Lovan)
This commit is contained in:
Wladimir J. van der Laan 2014-06-09 12:58:51 +02:00
commit 6741837233
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
1 changed files with 2 additions and 2 deletions

View File

@ -415,8 +415,8 @@ void RPCConsole::on_lineEdit_returnPressed()
{ {
message(CMD_REQUEST, cmd); message(CMD_REQUEST, cmd);
emit cmdRequest(cmd); emit cmdRequest(cmd);
// Truncate history from current position // Remove command, if already in history
history.erase(history.begin() + historyPtr, history.end()); history.removeOne(cmd);
// Append command to history // Append command to history
history.append(cmd); history.append(cmd);
// Enforce maximum history size // Enforce maximum history size