From 3a0e6ca5533bf887cd75eca0d8634f5221712b91 Mon Sep 17 00:00:00 2001 From: "Tim J. Robbins" Date: Mon, 14 Oct 2002 10:42:38 +0000 Subject: [PATCH] Write the strvis()'d string out to the history file in history_save(), not the original string. Fixes the bug where every second line of a history file was empty. --- lib/libedit/history.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libedit/history.c b/lib/libedit/history.c index c88979e4cff..f2e6aee6fdc 100644 --- a/lib/libedit/history.c +++ b/lib/libedit/history.c @@ -654,7 +654,7 @@ history_save(History *h, const char *fname) ptr = h_realloc(ptr, max_size); } (void) strvis(ptr, ev.str, VIS_WHITE); - (void) fprintf(fp, "%s\n", ev.str); + (void) fprintf(fp, "%s\n", ptr); } h_free(ptr); (void) fclose(fp);