Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Have 'bindkey -N new bad' report no such 'bad' (was 'new').



From: John Stahara <john.stahara@xxxxxxxxx>

If the second parameter to 'bindkey -N' refers to a map that does not
exist, it should be that one which is reported as missing, rather than
the new one the user is attempting to create.
---
 Src/Zle/zle_keymap.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c
index c3731c4..e21e769 100644
--- a/Src/Zle/zle_keymap.c
+++ b/Src/Zle/zle_keymap.c
@@ -912,7 +912,7 @@ bin_bindkey_new(char *name, UNUSED(char *kmname), Keymap km, char **argv, UNUSED
     if(argv[1]) {
 	km = openkeymap(argv[1]);
 	if(!km) {
-	    zwarnnam(name, "no such keymap `%s'", argv[0]);
+	    zwarnnam(name, "no such keymap `%s'", argv[1]);
 	    return 1;
 	}
     } else
-- 
1.7.8.6



Messages sorted by: Reverse Date, Date, Thread, Author