[vte/vte-0-46] emulation: Swallow iterm2 OSC 133



commit 81cfd369584df487b43e580d5c031714649c892b
Author: Christian Persch <chpe gnome org>
Date:   Tue Jun 13 09:27:06 2017 +0200

    emulation: Swallow iterm2 OSC 133
    
    Accept OSC 133 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 133 sequences that
    clutter the vte terminal since we don't ignore unknown sequences
    (bug 403130).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783710
    (cherry picked from commit af889244f9306d8686c6346da35f34694240882e)

 src/caps.cc        |    2 ++
 src/vteseq-n.gperf |    1 +
 src/vteseq.cc      |   12 ++++++++++--
 3 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/caps.cc b/src/caps.cc
index 3c3fd65..1f9cd1e 100644
--- a/src/caps.cc
+++ b/src/caps.cc
@@ -255,6 +255,7 @@ const char _vte_xterm_capability_strings[] =
         ENTRY(OSC "117" BEL, "reset-highlight-background-color")
         ENTRY(OSC "118" BEL, "reset-tek-cursor-color")
         ENTRY(OSC "119" BEL, "reset-highlight-foreground-color")
+        ENTRY(OSC "133;%s" BEL, "iterm2-133")
         ENTRY(OSC "777;%s" BEL, "urxvt-777")
         ENTRY(OSC "1337;%s" BEL, "iterm2-1337")
 
@@ -293,6 +294,7 @@ const char _vte_xterm_capability_strings[] =
         ENTRY(OSC "117" ST, "reset-highlight-background-color")
         ENTRY(OSC "118" ST, "reset-tek-cursor-color")
         ENTRY(OSC "119" ST, "reset-highlight-foreground-color")
+        ENTRY(OSC "133;%s" ST, "iterm2-133")
         ENTRY(OSC "777;%s" ST, "urxvt-777")
         ENTRY(OSC "1337;%s" ST, "iterm2-1337")
 
diff --git a/src/vteseq-n.gperf b/src/vteseq-n.gperf
index 3e60835..eec89ae 100644
--- a/src/vteseq-n.gperf
+++ b/src/vteseq-n.gperf
@@ -171,4 +171,5 @@ struct vteseq_n_struct {
 "set-current-file-uri", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_file_uri)
 "set-current-hyperlink", VTE_SEQUENCE_HANDLER(vte_sequence_handler_set_current_hyperlink)
 "urxvt-777", VTE_SEQUENCE_HANDLER(vte_sequence_handler_urxvt_777)
+"iterm2-133", VTE_SEQUENCE_HANDLER(vte_sequence_handler_iterm2_133)
 "iterm2-1337", VTE_SEQUENCE_HANDLER(vte_sequence_handler_iterm2_1337)
diff --git a/src/vteseq.cc b/src/vteseq.cc
index a8e66fe..4dab1de 100644
--- a/src/vteseq.cc
+++ b/src/vteseq.cc
@@ -3398,10 +3398,10 @@ vte_sequence_handler_urxvt_777(VteTerminalPrivate *that, GValueArray *params)
         /* Accept but ignore this for compatibility with downstream-patched vte (bug #711059)*/
 }
 
-/* iterm2 OSC 1337 */
+/* iterm2 OSC 133 & 1337 */
 
 static void
-vte_sequence_handler_iterm2_1337(VteTerminalPrivate *that, GValueArray *params)
+vte_sequence_handler_iterm2_133(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
@@ -3409,6 +3409,14 @@ vte_sequence_handler_iterm2_1337(VteTerminalPrivate *that, GValueArray *params)
          */
 }
 
+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 */
 


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