From 768b17751bc296b8fd96406486a33606a463bbef Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 22 Apr 2016 18:22:17 +0100 Subject: [PATCH] fix redline to send history at the very end --- os/readline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/os/readline.c b/os/readline.c index 0d9b13434..291ae45d8 100644 --- a/os/readline.c +++ b/os/readline.c @@ -473,12 +473,6 @@ int Yap_ReadlineForSIGINT(void) { } } -void Yap_CloseReadline(void) { -#if USE_READLINE - write_history(history_file); -#endif -} - static Int has_readline(USES_REGS1) { #if USE_READLINE return true; @@ -501,3 +495,9 @@ bool Yap_InitReadline(Term enable) { void Yap_InitReadlinePreds(void) {} #endif + +void Yap_CloseReadline(void) { +#if USE_READLINE + write_history(history_file); +#endif +}