diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-09-26 18:39:21 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-09-26 18:39:21 +0000 |
commit | d9bb1a52c91bdff06bb7af281dc75ceae332a4e3 (patch) | |
tree | 7f8e1609be8d4c4bf1569ec7be84f38c5098e6b2 /Src/Zle/zle_hist.c | |
parent | 4431ebe7c117ae951e8435326bad3bab1402fdb0 (diff) | |
download | zsh-d9bb1a52c91bdff06bb7af281dc75ceae332a4e3.tar.gz zsh-d9bb1a52c91bdff06bb7af281dc75ceae332a4e3.tar.xz zsh-d9bb1a52c91bdff06bb7af281dc75ceae332a4e3.zip |
21764: unmetafication mangle zle history lines
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r-- | Src/Zle/zle_hist.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |