From cfcbf601798082a68a1f3e46788773bf62f9708a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Thu, 7 Jan 2016 01:57:52 -0800 Subject: [PATCH] Do not add duplicate history entries for up-enter. --- Console.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Console.cpp b/Console.cpp index c14234e..db86eb8 100644 --- a/Console.cpp +++ b/Console.cpp @@ -400,6 +400,9 @@ class History { } } void operator +=(std::string command) { + if (HIST_ENTRY *entry = history_get(where_history())) + if (command == entry->line) + return; add_history(command.c_str()); ++histlines_; } -- 2.47.2