diff options
author | Josh Triplett <josh@joshtriplett.org> | 2009-12-28 03:22:48 +0100 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-12-28 03:22:48 +0100 |
commit | 4db015d59e80a992c86827e612e06c7df1c901f0 (patch) | |
tree | fbf6bc7def7e41c2cf6e2cb705c8e6818c9f47ca /src | |
parent | 718b6f1d1707a4397098cab0ec3bc4980cb7d1bf (diff) |
Bug 605299 - Please support xterm bracketed paste mode
Diffstat (limited to 'src')
-rw-r--r-- | src/vte-private.h | 1 | ||||
-rw-r--r-- | src/vte.c | 6 | ||||
-rw-r--r-- | src/vteseq.c | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/vte-private.h b/src/vte-private.h index 6a8b3c7..37d354a 100644 --- a/src/vte-private.h +++ b/src/vte-private.h @@ -218,6 +218,7 @@ 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 */ @@ -5351,7 +5351,11 @@ vte_terminal_paste_cb(GtkClipboard *clipboard, const gchar *text, gpointer data) p++; } } + if (terminal->pvt->screen->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) + vte_terminal_feed_child(terminal, "\e[201~", -1); g_free(paste); } } @@ -13406,12 +13410,14 @@ vte_terminal_reset(VteTerminal *terminal, gboolean full, gboolean clear_history) 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; /* Reset the encoding. */ vte_terminal_set_encoding(terminal, NULL); diff --git a/src/vteseq.c b/src/vteseq.c index 46d8ccc..fdc47db 100644 --- a/src/vteseq.c +++ b/src/vteseq.c @@ -719,6 +719,11 @@ vte_sequence_handler_decset_internal(VteTerminal *terminal, GINT_TO_POINTER(FALSE), GINT_TO_POINTER(TRUE), NULL, NULL}, + /* 2004: Bracketed paste mode. */ + {2004, &terminal->pvt->screen->bracketed_paste_mode, NULL, NULL, + GINT_TO_POINTER(FALSE), + GINT_TO_POINTER(TRUE), + NULL, NULL,}, }; /* Handle the setting. */ |