Enable input editing with the linenoise library.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 4a5d3c5deb797dd22e4d5a9017c03c6109aa85f5..31eaf4691e9e68131b9f9530941e7a750204dd65 100644 (file)
--- a/main.c
+++ b/main.c
@@ -11,6 +11,7 @@
 #include <time.h>
 #include "advent.h"
 #include "database.h"
+#include "linenoise/linenoise.h"
 
 struct game_t game;
 
@@ -82,6 +83,8 @@ case 'l':
        }
     }
 
+    linenoiseHistorySetMaxLen(350);
+
     /* Logical variables:
      *
      *  game.closed says whether we're all the way closed