diff options
author | Andrew Main <zefram@users.sourceforge.net> | 2001-09-03 01:39:19 +0000 |
---|---|---|
committer | Andrew Main <zefram@users.sourceforge.net> | 2001-09-03 01:39:19 +0000 |
commit | b73d71105eaca6ae001a3e836ab08406ef188789 (patch) | |
tree | 691753f67199df3b7c9cfdaec6b5dd88cb14bf18 /Src/Zle/zle_misc.c | |
parent | e8f8c3abee5763d58cfcb8eb89e50ec40dbcfde2 (diff) | |
download | zsh-b73d71105eaca6ae001a3e836ab08406ef188789.tar.gz zsh-b73d71105eaca6ae001a3e836ab08406ef188789.tar.xz zsh-b73d71105eaca6ae001a3e836ab08406ef188789.zip |
15734: zle -K option to select a keymap, and zle KEYMAP parameter to
examine the current selection.
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; |