about summary refs log tree commit diff
path: root/Src/Zle/zle_keymap.c
diff options
context:
space:
mode:
authorAndrew Main <zefram@users.sourceforge.net>2001-09-03 01:39:19 +0000
committerAndrew Main <zefram@users.sourceforge.net>2001-09-03 01:39:19 +0000
commitb73d71105eaca6ae001a3e836ab08406ef188789 (patch)
tree691753f67199df3b7c9cfdaec6b5dd88cb14bf18 /Src/Zle/zle_keymap.c
parente8f8c3abee5763d58cfcb8eb89e50ec40dbcfde2 (diff)
downloadzsh-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_keymap.c')
-rw-r--r--Src/Zle/zle_keymap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index f820a758f..9fd5a9197 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -388,7 +388,10 @@ selectkeymap(char *name, int fb)
 	    return 1;
 	km = openkeymap(name = ".safe");
     }
-    curkeymapname = name;
+    if(name != curkeymapname) {
+	zsfree(curkeymapname);
+	curkeymapname = ztrdup(name);
+    }
     curkeymap = km;
     return 0;
 }