Skip to content

Commit

Permalink
emulation: Swallow iterm2 OSC 133
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Christian Persch authored and Christian Persch committed Jun 13, 2017
1 parent a0b0a25 commit af88924
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/caps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -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")

Expand Down
1 change: 1 addition & 0 deletions src/vteseq-n.gperf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
12 changes: 10 additions & 2 deletions src/vteseq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3507,17 +3507,25 @@ 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
* iterm2.
*/
}

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 */

Expand Down

0 comments on commit af88924

Please sign in to comment.