From: Jay Freeman (saurik) Date: Thu, 7 Jan 2016 09:57:52 +0000 (-0800) Subject: Do not add duplicate history entries for up-enter. X-Git-Tag: v0.9.590~39 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/cfcbf601798082a68a1f3e46788773bf62f9708a Do not add duplicate history entries for up-enter. --- 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_; }