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);