1 commit 7206376160aac2743a93f70a4726bad4f34fa688
2 Author: Fuujuhi <fuujuhi-ml1@noekeon.org>
3 Date: Wed Jul 30 15:52:52 2014 +0200
5 backporting vte bracked paste mode bug patch on v0.28.2-5ubuntu1
7 See https://bugzilla.gnome.org/show_bug.cgi?id=729533
8 Patch at https://bugzilla.gnome.org/attachment.cgi?id=279320
10 diff --git a/src/vte-private.h b/src/vte-private.h
11 index 65d5022..ac1f2d8 100644
12 --- a/src/vte-private.h
13 +++ b/src/vte-private.h
14 @@ -219,7 +219,6 @@ struct _VteTerminalPrivate {
15 gboolean sendrecv_mode; /* sendrecv mode */
16 gboolean insert_mode; /* insert mode */
17 gboolean linefeed_mode; /* linefeed mode */
18 - gboolean bracketed_paste_mode;
19 struct vte_scrolling_region {
21 } scrolling_region; /* the region we scroll in */
22 @@ -274,6 +273,7 @@ struct _VteTerminalPrivate {
23 gboolean text_modified_flag;
24 gboolean text_inserted_flag;
25 gboolean text_deleted_flag;
26 + gboolean bracketed_paste_mode;
28 /* Scrolling options. */
29 gboolean scroll_background;
30 diff --git a/src/vte.c b/src/vte.c
31 index c20ee78..dbab6de 100644
34 @@ -5823,10 +5823,10 @@ static void mark_output_source_invalid(VteTerminal *terminal)
38 - if (terminal->pvt->screen->bracketed_paste_mode)
39 + if (terminal->pvt->bracketed_paste_mode)
40 vte_terminal_feed_child(terminal, "\e[200~", -1);
41 vte_terminal_feed_child(terminal, paste, length);
42 - if (terminal->pvt->screen->bracketed_paste_mode)
43 + if (terminal->pvt->bracketed_paste_mode)
44 vte_terminal_feed_child(terminal, "\e[201~", -1);
47 @@ -14106,14 +14106,12 @@ static void mark_output_source_invalid(VteTerminal *terminal)
48 pvt->normal_screen.linefeed_mode = FALSE;
49 pvt->normal_screen.origin_mode = FALSE;
50 pvt->normal_screen.reverse_mode = FALSE;
51 - pvt->normal_screen.bracketed_paste_mode = FALSE;
52 pvt->alternate_screen.scrolling_restricted = FALSE;
53 pvt->alternate_screen.sendrecv_mode = TRUE;
54 pvt->alternate_screen.insert_mode = FALSE;
55 pvt->alternate_screen.linefeed_mode = FALSE;
56 pvt->alternate_screen.origin_mode = FALSE;
57 pvt->alternate_screen.reverse_mode = FALSE;
58 - pvt->alternate_screen.bracketed_paste_mode = FALSE;
59 pvt->cursor_visible = TRUE;
60 /* Reset the encoding. */
61 vte_terminal_set_encoding(terminal, NULL);
62 @@ -14143,6 +14141,8 @@ static void mark_output_source_invalid(VteTerminal *terminal)
63 pvt->mouse_last_y = 0;
64 /* Clear modifiers. */
66 + /* Reset miscellaneous stuff. */
67 + pvt->bracketed_paste_mode = FALSE;
68 /* Cause everything to be redrawn (or cleared). */
69 vte_terminal_maybe_scroll_to_bottom(terminal);
70 _vte_invalidate_all(terminal);
71 diff --git a/src/vteseq.c b/src/vteseq.c
72 index 209522f..8c8d43c 100644
76 GINT_TO_POINTER(TRUE),
78 /* 2004: Bracketed paste mode. */
79 - {2004, &terminal->pvt->screen->bracketed_paste_mode, NULL, NULL,
80 + {2004, &terminal->pvt->bracketed_paste_mode, NULL, NULL,
81 GINT_TO_POINTER(FALSE),
82 GINT_TO_POINTER(TRUE),