From d9bb1a52c91bdff06bb7af281dc75ceae332a4e3 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 26 Sep 2005 18:39:21 +0000 Subject: 21764: unmetafication mangle zle history lines --- ChangeLog | 3 +++ Src/Zle/zle_hist.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a79681bc3..040086a8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-09-26 Peter Stephenson + * 21764: Src/Zle/zle_hist.c: unmetafication mangled history lines + in zle. + * unposted: Doc/Zsh/redirect.yo: alter text referring to process substitutions slightly. diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index f529e7820..80a406a8a 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -75,6 +75,8 @@ struct zle_text { static void zletext(Histent ent, struct zle_text *zt) { + char *duptext; + if (ent->zle_text) { zt->text = ent->zle_text; zt->len = ent->zle_len; @@ -82,8 +84,10 @@ zletext(Histent ent, struct zle_text *zt) return; } - zt->text = stringaszleline((unsigned char *)ent->text, 0, + duptext = ztrdup(ent->text); + zt->text = stringaszleline((unsigned char *)duptext, 0, &zt->len, NULL, NULL); + zsfree(duptext); zt->alloced = 1; } -- cgit v1.2.3-70-g09d2