From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Mar 26 23:20:09 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A1AA1065672 for ; Mon, 26 Mar 2012 23:20:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6CDB58FC17 for ; Mon, 26 Mar 2012 23:20:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2QNK991098142 for ; Mon, 26 Mar 2012 23:20:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2QNK9EQ098141; Mon, 26 Mar 2012 23:20:09 GMT (envelope-from gnats) Resent-Date: Mon, 26 Mar 2012 23:20:09 GMT Resent-Message-Id: <201203262320.q2QNK9EQ098141@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Pedro Giffuni Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 468671065673 for ; Mon, 26 Mar 2012 23:14:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 311178FC16 for ; Mon, 26 Mar 2012 23:14:56 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2QNEtKK082889 for ; Mon, 26 Mar 2012 23:14:55 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q2QNEtA6082867; Mon, 26 Mar 2012 23:14:55 GMT (envelope-from nobody) Message-Id: <201203262314.q2QNEtA6082867@red.freebsd.org> Date: Mon, 26 Mar 2012 23:14:55 GMT From: Pedro Giffuni To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/166435: Update devel/libedit with local patches X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Mar 2012 23:20:09 -0000 >Number: 166435 >Category: ports >Synopsis: Update devel/libedit with local patches >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Mar 26 23:20:09 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Pedro Giffuni >Release: 9.0-RELEASE >Organization: >Environment: FreeBSD pcbsd-8714 9.0-RELEASE FreeBSD 9.0-RELEASE #3: Tue Dec 27 14:14:29 PST 2011 root@build9x64.pcbsd.org:/usr/obj/builds/amd64/pcbsd-build90/fbsd-source/9.0/sys/GENERIC amd64 >Description: The sourceforge version hasn't been keeping up to date with the upstream (NetBSD) versions. Our local version of libedit has a couple of changes that have been accepted by NetBSD so I think it's a good idea to keep the port version consistent with them. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN libedit.orig/files/patch-common.c libedit/files/patch-common.c --- libedit.orig/files/patch-common.c 1969-12-31 19:00:00.000000000 -0500 +++ libedit/files/patch-common.c 2012-03-23 16:41:38.000000000 -0500 @@ -0,0 +1,29 @@ +Revision 212191 +libedit: Do not move the cursor for ed-delete-next-char in emacs mode. + +This makes ed-delete-next-char suitable for mapping to the key. + +Behaviour in vi mode is unchanged (for 'x'). + +--- common.c 2007/03/11 18:30:22 167457 ++++ common.c 2010/09/03 22:24:26 212191 +@@ -163,15 +163,12 @@ + return (CC_ERROR); + #endif + } +- } else { +- if (el->el_line.cursor != el->el_line.buffer) +- el->el_line.cursor--; +- else +- return (CC_ERROR); +- } ++ } else ++ return (CC_ERROR); + } + c_delafter(el, el->el_state.argument); /* delete after dot */ +- if (el->el_line.cursor >= el->el_line.lastchar && ++ if (el->el_map.type == MAP_VI && ++ el->el_line.cursor >= el->el_line.lastchar && + el->el_line.cursor > el->el_line.buffer) + /* bounds check */ + el->el_line.cursor = el->el_line.lastchar - 1; diff -ruN libedit.orig/files/patch-terminal libedit/files/patch-terminal --- libedit.orig/files/patch-terminal 1969-12-31 19:00:00.000000000 -0500 +++ libedit/files/patch-terminal 2012-03-23 17:06:19.000000000 -0500 @@ -0,0 +1,50 @@ +Revision 212235 +libedit: Try to map to ed-delete-next-char. + +This adds a new "arrow" key "delete" corresponding to the kD termcap +value. It only works if that is a sequence such as "\033[3~"; if it is +"\177", the em-delete-prev-char or ed-delete-prev-char from the +single-character mappings remains. It turns out that most terminals (xterm +and alikes, syscons in xterm mode) produce "\033[3~" by default so + has the expected effect. + +This also means that things need to be considerably misconfigured for + to perform a action. + +--- term.c 2007/06/10 19:06:09 170511 ++++ term.c 2010/09/05 16:12:10 212235 +@@ -223,7 +223,9 @@ + { "kh", "send cursor home" }, + #define T_at7 37 + { "@7", "send cursor end" }, +-#define T_str 38 ++#define T_kD 38 ++ { "kD", "send cursor delete" }, ++#define T_str 39 + { NULL, NULL } + }; + +@@ -1062,6 +1064,11 @@ + arrow[A_K_EN].key = T_at7; + arrow[A_K_EN].fun.cmd = ED_MOVE_TO_END; + arrow[A_K_EN].type = XK_CMD; ++ ++ arrow[A_K_DE].name = "delete"; ++ arrow[A_K_DE].key = T_kD; ++ arrow[A_K_DE].fun.cmd = ED_DELETE_NEXT_CHAR; ++ arrow[A_K_DE].type = XK_CMD; + } + + +--- term.h 2007/06/10 19:06:09 170511 ++++ term.h 2010/09/05 16:12:10 212235 +@@ -79,7 +79,8 @@ + #define A_K_RT 3 + #define A_K_HO 4 + #define A_K_EN 5 +-#define A_K_NKEYS 6 ++#define A_K_DE 6 ++#define A_K_NKEYS 7 + + protected void term_move_to_line(EditLine *, int); + protected void term_move_to_char(EditLine *, int); >Release-Note: >Audit-Trail: >Unformatted: