summaryrefslogtreecommitdiffstats
path: root/lib/libedit
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-01-01 19:20:51 +0000
committerpfg <pfg@FreeBSD.org>2013-01-01 19:20:51 +0000
commitea3d4153432447110dcfd6563fd07cc9b7c0e9c2 (patch)
tree5f797992e0a68bc0f42c203c052c3ac2e725db22 /lib/libedit
parentf78ae912181f6031734a404ddfc728d357245ef4 (diff)
downloadFreeBSD-src-ea3d4153432447110dcfd6563fd07cc9b7c0e9c2.zip
FreeBSD-src-ea3d4153432447110dcfd6563fd07cc9b7c0e9c2.tar.gz
libedit: bind the correct command when using "bind -k".
"ed-argument-digit" (i. e. command 0) was incorrectly used instead. This bug comes from the original sources imported in 1994 and has been confirmed in upstream NetBSD. Reported by: Yamagi Burmeister Submitted by: Christoph Mallon MFC after: 3 days
Diffstat (limited to 'lib/libedit')
-rw-r--r--lib/libedit/map.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libedit/map.c b/lib/libedit/map.c
index 591118f..c70904a 100644
--- a/lib/libedit/map.c
+++ b/lib/libedit/map.c
@@ -1250,7 +1250,7 @@ map_bind(EditLine *el, int argc, const char **argv)
char inbuf[EL_BUFSIZ];
char outbuf[EL_BUFSIZ];
const char *in = NULL;
- char *out = NULL;
+ char *out;
el_bindings_t *bp, *ep;
int cmd;
int key;
@@ -1368,7 +1368,7 @@ map_bind(EditLine *el, int argc, const char **argv)
return (-1);
}
if (key)
- term_set_arrow(el, in, key_map_str(el, out), ntype);
+ term_set_arrow(el, in, key_map_cmd(el, cmd), ntype);
else {
if (in[1]) {
key_add(el, in, key_map_cmd(el, cmd), ntype);
OpenPOWER on IntegriCloud