Module Name:    src
Committed By:   christos
Date:           Sat Mar 24 20:09:30 UTC 2012

Modified Files:
        src/lib/libedit: terminal.c terminal.h

Log Message:
From: Jilles Tjoelker: Add a mapping for the cursor delete key


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libedit/terminal.c
cvs rdiff -u -r1.3 -r1.4 src/lib/libedit/terminal.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libedit/terminal.c
diff -u src/lib/libedit/terminal.c:1.12 src/lib/libedit/terminal.c:1.13
--- src/lib/libedit/terminal.c:1.12	Fri Nov 18 15:32:00 2011
+++ src/lib/libedit/terminal.c	Sat Mar 24 16:09:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: terminal.c,v 1.12 2011/11/18 20:32:00 christos Exp $	*/
+/*	$NetBSD: terminal.c,v 1.13 2012/03/24 20:09:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)term.c	8.2 (Berkeley) 4/30/95";
 #else
-__RCSID("$NetBSD: terminal.c,v 1.12 2011/11/18 20:32:00 christos Exp $");
+__RCSID("$NetBSD: terminal.c,v 1.13 2012/03/24 20:09:30 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -169,7 +169,9 @@ private const struct termcapstr {
 	{ "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 }
 };
 
@@ -1031,6 +1033,11 @@ terminal_init_arrow(EditLine *el)
 	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 = STR("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;
 }
 
 

Index: src/lib/libedit/terminal.h
diff -u src/lib/libedit/terminal.h:1.3 src/lib/libedit/terminal.h:1.4
--- src/lib/libedit/terminal.h:1.3	Fri Jul 29 19:44:45 2011
+++ src/lib/libedit/terminal.h	Sat Mar 24 16:09:30 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $	*/
+/*	$NetBSD: terminal.h,v 1.4 2012/03/24 20:09:30 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -79,7 +79,8 @@ typedef struct {
 #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	terminal_move_to_line(EditLine *, int);
 protected void	terminal_move_to_char(EditLine *, int);

Reply via email to