From owner-svn-src-all@FreeBSD.ORG Fri Jan 4 04:03:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AB342475; Fri, 4 Jan 2013 04:03:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 852A0847; Fri, 4 Jan 2013 04:03:22 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0443Mrk048554; Fri, 4 Jan 2013 04:03:22 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0443M8j048552; Fri, 4 Jan 2013 04:03:22 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201301040403.r0443M8j048552@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Fri, 4 Jan 2013 04:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r245025 - stable/9/lib/libedit X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 04:03:22 -0000 Author: pfg Date: Fri Jan 4 04:03:21 2013 New Revision: 245025 URL: http://svnweb.freebsd.org/changeset/base/245025 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/9/lib/libedit/map.c Directory Properties: stable/9/lib/libedit/ (props changed) Modified: stable/9/lib/libedit/map.c ============================================================================== --- stable/9/lib/libedit/map.c Fri Jan 4 03:54:22 2013 (r245024) +++ stable/9/lib/libedit/map.c Fri Jan 4 04:03:21 2013 (r245025) @@ -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);