]> git.saurik.com Git - cycript.git/commitdiff
Do not add duplicate history entries for up-enter.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 7 Jan 2016 09:57:52 +0000 (01:57 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 7 Jan 2016 09:57:52 +0000 (01:57 -0800)
Console.cpp

index c14234e3aaff863118a1677a3d9d56d96b74bd4c..db86eb82f5000fcc2f7a95d451a80ccd254d32d9 100644 (file)
@@ -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_;
     }