Fixed console history truncation

This commit is contained in:
crowning- 2015-03-25 10:16:46 +01:00
parent 1b16c4aae9
commit 51fdade5c7

4
src/qt/rpcconsole.cpp Normal file → Executable file
View File

@ -391,8 +391,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