diff options
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r-- | Src/Zle/zle_misc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index e24d0c08b..592a590b5 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -669,7 +669,7 @@ executenamedcommand(char *prmt) int len, l = strlen(prmt), feep = 0, listed = 0, curlist = 0; int ols = (listshown && validlist), olll = lastlistlen; char *ptr; - char *okeymap = curkeymapname; + char *okeymap = ztrdup(curkeymapname); clearlist = 1; cmdbuf = zhalloc(l + NAMLEN + 2); @@ -685,6 +685,7 @@ executenamedcommand(char *prmt) if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) { statusline = NULL; selectkeymap(okeymap, 1); + zsfree(okeymap); if ((listshown = ols)) { showinglist = -2; lastlistlen = olll; @@ -752,6 +753,7 @@ executenamedcommand(char *prmt) unrefthingy(r); statusline = NULL; selectkeymap(okeymap, 1); + zsfree(okeymap); if ((listshown = ols)) { showinglist = -2; lastlistlen = olll; |