svn commit: r245026 - stable/8/lib/libedit

Pedro F. Giffuni pfg at FreeBSD.org
Fri Jan 4 04:03:40 UTC 2013


Author: pfg
Date: Fri Jan  4 04:03:39 2013
New Revision: 245026
URL: http://svnweb.freebsd.org/changeset/base/245026

Log:
  MFC	r244941:
  
  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

Modified:
  stable/8/lib/libedit/map.c
Directory Properties:
  stable/8/lib/libedit/   (props changed)

Modified: stable/8/lib/libedit/map.c
==============================================================================
--- stable/8/lib/libedit/map.c	Fri Jan  4 04:03:21 2013	(r245025)
+++ stable/8/lib/libedit/map.c	Fri Jan  4 04:03:39 2013	(r245026)
@@ -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);


More information about the svn-src-all mailing list