Date: Tue, 1 Jan 2013 19:20:52 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244941 - head/lib/libedit Message-ID: <201301011920.r01JKqkI023561@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Tue Jan 1 19:20:51 2013 New Revision: 244941 URL: http://svnweb.freebsd.org/changeset/base/244941 Log: 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 Modified: head/lib/libedit/map.c Modified: head/lib/libedit/map.c ============================================================================== --- head/lib/libedit/map.c Tue Jan 1 18:55:49 2013 (r244940) +++ head/lib/libedit/map.c Tue Jan 1 19:20:51 2013 (r244941) @@ -1250,7 +1250,7 @@ map_bind(EditLine *el, int argc, const c 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 c 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301011920.r01JKqkI023561>