Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit From: Jilles Tjoelker: Add a mapping for the cur...
details: https://anonhg.NetBSD.org/src/rev/8157bd6a440a
branches: trunk
changeset: 778398:8157bd6a440a
user: christos <christos%NetBSD.org@localhost>
date: Sat Mar 24 20:09:30 2012 +0000
description:
From: Jilles Tjoelker: Add a mapping for the cursor delete key
diffstat:
lib/libedit/terminal.c | 13 ++++++++++---
lib/libedit/terminal.h | 5 +++--
2 files changed, 13 insertions(+), 5 deletions(-)
diffs (60 lines):
diff -r cd9bb73bacb4 -r 8157bd6a440a lib/libedit/terminal.c
--- a/lib/libedit/terminal.c Sat Mar 24 20:08:43 2012 +0000
+++ b/lib/libedit/terminal.c Sat Mar 24 20:09:30 2012 +0000
@@ -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 @@
{ "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 @@
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;
}
diff -r cd9bb73bacb4 -r 8157bd6a440a lib/libedit/terminal.h
--- a/lib/libedit/terminal.h Sat Mar 24 20:08:43 2012 +0000
+++ b/lib/libedit/terminal.h Sat Mar 24 20:09:30 2012 +0000
@@ -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 @@
#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);
Home |
Main Index |
Thread Index |
Old Index