summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2016-07-04 21:26:50 +0200
committerChristian Persch <chpe@gnome.org>2016-07-04 21:27:25 +0200
commitc9e166330bbbbc4e2661345ffce07460f0df8eb2 (patch)
treea3edd9fbd0acbfa109c9c1d592e64b38e715c23e
parentf08229fd4a3c200ef2be2f30e66b57199a170626 (diff)
downloadvte-c9e166330bbbbc4e2661345ffce07460f0df8eb2.tar.gz
emulation: Swallow iterm2 OSC 1337
Accept OSC 1337 but make it a no-op. When sshing to an osx host the iterm2 integration may be active, causing the remote shell to emit iterm2 OSC 1337 sequences that clutter the vte terminal since we don't ignore unknown sequences (bug 403130). https://bugzilla.gnome.org/show_bug.cgi?id=403130 (cherry picked from commit 3c56e2cb170b7f5f085570f0f60ccc62bdc65700)
-rw-r--r--src/caps.cc2
-rw-r--r--src/vteseq-n.gperf1
-rw-r--r--src/vteseq.cc12
3 files changed, 15 insertions, 0 deletions
diff --git a/src/caps.cc b/src/caps.cc
index f5ad64a1..98e06215 100644
--- a/src/caps.cc
+++ b/src/caps.cc
@@ -255,6 +255,7 @@ const char _vte_xterm_capability_strings[] =
ENTRY(OSC "118" BEL, "reset-tek-cursor-color")
ENTRY(OSC "119" BEL, "reset-highlight-foreground-color")
ENTRY(OSC "777;%s" BEL, "urxvt-777")
+ ENTRY(OSC "1337;%s" BEL, "iterm2-1337")
COMMENT(/* Set text parameters, ST-terminated versions. */)
ENTRY(OSC ";%s" ST, "set-icon-and-window-title") COMMENT(/* undocumented default */)
@@ -291,6 +292,7 @@ const char _vte_xterm_capability_strings[] =
ENTRY(OSC "118" ST, "reset-tek-cursor-color")
ENTRY(OSC "119" ST, "reset-highlight-foreground-color")
ENTRY(OSC "777;%s" ST, "urxvt-777")
+ ENTRY(OSC "1337;%s" ST, "iterm2-1337")
COMMENT(/* These may be bogus, I can't find docs for them anywhere (#104154). */)
ENTRY(OSC "21;%s" BEL, "set-text-property-21")
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index e58dd947..5b9e0a6a 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -169,3 +169,4 @@ struct vteseq_n_struct {
"set-current-directory-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_directory_uri)
"set-current-file-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_file_uri)
"urxvt-777", VTE_SEQUENCE_HANDLER(vte_sequence_handler_urxvt_777)
+"iterm2-1337", VTE_SEQUENCE_HANDLER(vte_sequence_handler_iterm2_1337)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index c83391c7..2330939d 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -3392,6 +3392,18 @@ vte_sequence_handler_urxvt_777(VteTerminalPrivate *that, GValueArray *params)
/* Accept but ignore this for compatibility with downstream-patched vte (bug #711059)*/
}
+/* iterm2 OSC 1337 */
+
+static void
+vte_sequence_handler_iterm2_1337(VteTerminalPrivate *that, GValueArray *params)
+{
+ /* Accept but ignore this for compatibility when sshing to an osx host
+ * where the iterm2 integration is loaded even when not actually using
+ * iterm2.
+ */
+}
+
+
/* Lookup tables */
#define VTE_SEQUENCE_HANDLER(name) name