summaryrefslogtreecommitdiff
blob: 734e7b530ce420102b6f227d88a7cd1903be5fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN vte-0.17.4.orig/src/vte.c vte-0.17.4/src/vte.c
--- vte-0.17.4.orig/src/vte.c	2008-09-08 15:48:31.000000000 -0400
+++ vte-0.17.4/src/vte.c	2008-12-08 22:22:38.000000000 -0500
@@ -4636,6 +4636,7 @@ vte_terminal_key_press(GtkWidget *widget
 
 	/* Now figure out what to send to the child. */
 	if ((event->type == GDK_KEY_PRESS) && !modifier) {
+		cc_t erase = VTE_VDISABLE;
 		handled = FALSE;
 		/* Map the key to a sequence name if we can. */
 		switch (keyval) {
@@ -4661,11 +4662,15 @@ vte_terminal_key_press(GtkWidget *widget
 				if (terminal->pvt->pty_master != -1) {
 					if (tcgetattr(terminal->pvt->pty_master,
 						      &tio) != -1) {
-						normal = g_strdup_printf("%c",
-									 tio.c_cc[VERASE]);
 						normal_length = 1;
+						erase = tio.c_cc[VERASE];
 					}
 				}
+				if (erase == VTE_VDISABLE)
+					normal = g_strdup(""); /* Fallback value. */
+				else
+					normal = g_strdup_printf("%c", erase);
+				normal_length = 1;
 				suppress_meta_esc = FALSE;
 				break;
 			}
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN vte-0.17.4.orig/src/vte-private.h vte-0.17.4/src/vte-private.h
--- vte-0.17.4.orig/src/vte-private.h	2008-09-08 15:48:31.000000000 -0400
+++ vte-0.17.4/src/vte-private.h	2008-12-08 22:22:38.000000000 -0500
@@ -91,6 +91,12 @@ G_BEGIN_DECLS
 #define VTE_MAX_PROCESS_TIME		100
 #define VTE_CELL_BBOX_SLACK		1
 
+#ifdef _POSIX_VDISABLE /* From unistd.h */
+#define VTE_VDISABLE			_POSIX_VDISABLE
+#else
+#define VTE_VDISABLE			'\0'
+#endif
+
 /* The structure we use to hold characters we're supposed to display -- this
  * includes any supported visible attributes. */
 struct vte_charcell {