summaryrefslogtreecommitdiffstats
path: root/x11-libs/vte/files/vte-0.56.2-ds-mc.diff
blob: cfa411efb1b3ae0da09aaa06c95923a26ce550ca (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Description: DarkSoft mc patches
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 vte2.91 (0.56.2-1ubuntu1~19.04.1) disco; urgency=medium
 .
   * Backport bugfix release to disco (LP: #1827207)
Author: Iain Lane <iain.lane@canonical.com>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1827207

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-07-07

--- vte2.91-0.56.2.orig/ChangeLog
+++ vte2.91-0.56.2/ChangeLog
@@ -1,3 +1,9 @@
+Author: Suren A. Chilingaryan <csa@suren.me>
+Date:   Sun Jul 7 11:16:00 2019 +0200
+
+    mc integration
+
+
 commit 9a079492ea698f573dfc7129f1c79e4a865803b4
 Author: Christian Persch <chpe@src.gnome.org>
 Date:   Sat Apr 20 19:41:46 2019 +0200
--- vte2.91-0.56.2.orig/src/vte.cc
+++ vte2.91-0.56.2/src/vte.cc
@@ -4763,7 +4763,9 @@ Terminal::widget_key_press(GdkEventKey *
 			break;
 		case GDK_KEY_KP_Insert:
 		case GDK_KEY_Insert:
-			if (m_modifiers & GDK_SHIFT_MASK) {
+			//printf("%lx %s\n", modifiers, terminal->window_title);
+			if (strncmp(vte_terminal_get_window_title(m_terminal), "mc", 2)) {
+			    if (m_modifiers & GDK_SHIFT_MASK) {
 				if (m_modifiers & GDK_CONTROL_MASK) {
                                         emit_paste_clipboard();
 					handled = TRUE;
@@ -4773,11 +4775,29 @@ Terminal::widget_key_press(GdkEventKey *
 					handled = TRUE;
 					suppress_meta_esc = TRUE;
 				}
-			} else if (m_modifiers & GDK_CONTROL_MASK) {
+			    } else if (m_modifiers & GDK_CONTROL_MASK) {
                                 emit_copy_clipboard();
 				handled = TRUE;
 				suppress_meta_esc = TRUE;
+			    }
 			}
+
+			if ((m_modifiers & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
+				widget_paste(GDK_SELECTION_PRIMARY);
+				handled = TRUE;
+				suppress_meta_esc = TRUE;
+			} else if (m_modifiers & (GDK_MOD1_MASK|GDK_META_MASK|0x2000)) {
+				if (m_modifiers & GDK_CONTROL_MASK) {
+					emit_copy_clipboard();
+					handled = TRUE;
+					suppress_meta_esc = TRUE;
+				} else if (m_modifiers & GDK_SHIFT_MASK) {
+					widget_paste(GDK_SELECTION_PRIMARY);
+					handled = TRUE;
+					suppress_meta_esc = TRUE;
+				}
+ 			}
+
 			break;
 		/* Keypad/motion keys. */
 		case GDK_KEY_KP_Up: