Skip to content

Commit 6741837

Browse files
committed
Merge pull request #4300
dff0e3b [Qt] Improve rpc console history behavior (Cozz Lovan)
2 parents 62fdf38 + dff0e3b commit 6741837

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/rpcconsole.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ void RPCConsole::on_lineEdit_returnPressed()
415415
{
416416
message(CMD_REQUEST, cmd);
417417
emit cmdRequest(cmd);
418-
// Truncate history from current position
419-
history.erase(history.begin() + historyPtr, history.end());
418+
// Remove command, if already in history
419+
history.removeOne(cmd);
420420
// Append command to history
421421
history.append(cmd);
422422
// Enforce maximum history size

0 commit comments

Comments
 (0)