From 4cbb79191f6a238a489c0d186623184a5f50a8be Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 27 Jan 2015 02:08:09 +0100 Subject: [PATCH] Don't put duplicate lines in the console history --- apps/openmw/mwgui/console.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/console.cpp b/apps/openmw/mwgui/console.cpp index 5629c25f1b..4eb9a271c1 100644 --- a/apps/openmw/mwgui/console.cpp +++ b/apps/openmw/mwgui/console.cpp @@ -290,7 +290,8 @@ namespace MWGui // Add the command to the history, and set the current pointer to // the end of the list - mCommandHistory.push_back(cm); + if (mCommandHistory.empty() || mCommandHistory.back() != cm) + mCommandHistory.push_back(cm); mCurrent = mCommandHistory.end(); mEditString.clear();