Enable input editing with the linenoise library.

This commit is contained in:
Eric S. Raymond 2017-06-10 05:11:29 -04:00
parent 037f1df7dd
commit 63e971fc4c
5 changed files with 30 additions and 7 deletions

3
main.c
View file

@ -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