[vte] emulation: Change bracketed paste mode to per-terminal



commit 07a3f97381112dad889b99211ce655b84858ed66
Author: Egmont Koblinger <egmont gmail com>
Date:   Tue May 6 13:24:46 2014 +0200

    emulation: Change bracketed paste mode to per-terminal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729533

 src/vte-private.h |    2 +-
 src/vte.c         |    8 ++++----
 src/vteseq.c      |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/vte-private.h b/src/vte-private.h
index 77582b3..64476da 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -236,7 +236,6 @@ struct _VteTerminalPrivate {
                gboolean sendrecv_mode; /* sendrecv mode */
                gboolean insert_mode;   /* insert mode */
                gboolean linefeed_mode; /* linefeed mode */
-               gboolean bracketed_paste_mode;
                struct vte_scrolling_region {
                        int start, end;
                } scrolling_region;     /* the region we scroll in */
@@ -292,6 +291,7 @@ struct _VteTerminalPrivate {
        gboolean text_inserted_flag;
        gboolean text_deleted_flag;
        gboolean rewrap_on_resize;
+       gboolean bracketed_paste_mode;
 
        /* Scrolling options. */
        gboolean scroll_background;
diff --git a/src/vte.c b/src/vte.c
index 9dbb951..135eef7 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5444,10 +5444,10 @@ vte_terminal_paste_cb(GtkClipboard *clipboard, const gchar *text, gpointer data)
                                p++;
                        }
                }
-               if (terminal->pvt->screen->bracketed_paste_mode)
+               if (terminal->pvt->bracketed_paste_mode)
                        vte_terminal_feed_child(terminal, "\e[200~", -1);
                vte_terminal_feed_child(terminal, paste, length);
-               if (terminal->pvt->screen->bracketed_paste_mode)
+               if (terminal->pvt->bracketed_paste_mode)
                        vte_terminal_feed_child(terminal, "\e[201~", -1);
                g_free(paste);
        }
@@ -12748,14 +12748,12 @@ vte_terminal_reset(VteTerminal *terminal,
        pvt->normal_screen.linefeed_mode = FALSE;
        pvt->normal_screen.origin_mode = FALSE;
        pvt->normal_screen.reverse_mode = FALSE;
-       pvt->normal_screen.bracketed_paste_mode = FALSE;
        pvt->alternate_screen.scrolling_restricted = FALSE;
        pvt->alternate_screen.sendrecv_mode = TRUE;
        pvt->alternate_screen.insert_mode = FALSE;
        pvt->alternate_screen.linefeed_mode = FALSE;
        pvt->alternate_screen.origin_mode = FALSE;
        pvt->alternate_screen.reverse_mode = FALSE;
-       pvt->alternate_screen.bracketed_paste_mode = FALSE;
        pvt->cursor_visible = TRUE;
         /* For some reason, xterm doesn't reset alternateScroll, but we do. */
         pvt->alternate_screen_scroll = TRUE;
@@ -12790,6 +12788,8 @@ vte_terminal_reset(VteTerminal *terminal,
        pvt->mouse_smooth_scroll_delta = 0.;
        /* Clear modifiers. */
        pvt->modifiers = 0;
+       /* Reset miscellaneous stuff. */
+       pvt->bracketed_paste_mode = FALSE;
        /* Cause everything to be redrawn (or cleared). */
        vte_terminal_maybe_scroll_to_bottom(terminal);
        _vte_invalidate_all(terminal);
diff --git a/src/vteseq.c b/src/vteseq.c
index e05fc29..f2fd84e 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -781,7 +781,7 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal,
                 TRUE,
                 NULL, NULL},
                /* 2004: Bracketed paste mode. */
-               {2004, SCREEN_OFFSET(bracketed_paste_mode), 0, 0,
+               {2004, PRIV_OFFSET(bracketed_paste_mode), 0, 0,
                 FALSE,
                 TRUE,
                 NULL, NULL,},


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]