summaryrefslogtreecommitdiffstats
path: root/lib/libedit
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-10-14 10:42:38 +0000
committertjr <tjr@FreeBSD.org>2002-10-14 10:42:38 +0000
commit2d375c4af294e3f63190b762a91abd45c7cf12ed (patch)
tree706652ae90bd698e3456a71af0fb4af45e017382 /lib/libedit
parenta61bdcb3db72166ff722c338c5d68c0925217ec2 (diff)
downloadFreeBSD-src-2d375c4af294e3f63190b762a91abd45c7cf12ed.zip
FreeBSD-src-2d375c4af294e3f63190b762a91abd45c7cf12ed.tar.gz
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.
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/history.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libedit/history.c b/lib/libedit/history.c
index c88979e..f2e6aee 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);
OpenPOWER on IntegriCloud