diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_hist.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index f187d171b..67827d530 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -107,7 +107,9 @@ remember_edits(void) ZS_memcmp(ent->zle_text, zleline, zlell) != 0) { if (ent->zle_text) free(ent->zle_text); - ent->zle_text = stringaszleline(ent->text, &ent->zle_len, NULL); + ent->zle_text = zalloc(zlell * ZLE_CHAR_SIZE); + ent->zle_len = zlell; + ZS_memcpy(ent->zle_text, zleline, zlell); } } } |