1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 06:12:16 +03:00

Treat OSC 0 and OSC 1 the same as OSC 2: set the title

OSC 1 is defined as setting the "Icon Title".
OSC 2 is defined as setting the "Window Title".
OSC 0 sets both of those.

Some terminal emulators will display the Icon title as the tab
title.

Wezterm doesn't make a distinction between any of those things; the
title is applied (during escape sequence parsing) to the terminal
instance in isolation from any other terminals; when the GUI layer
renders the titlebar it is composed from the title in the active tab.

refs: https://github.com/wez/wezterm/issues/247
This commit is contained in:
Wez Furlong 2020-08-02 22:52:04 -07:00
parent 4605244af7
commit dd57f05774

View File

@ -2810,12 +2810,13 @@ impl<'a> Performer<'a> {
fn osc_dispatch(&mut self, osc: OperatingSystemCommand) { fn osc_dispatch(&mut self, osc: OperatingSystemCommand) {
self.flush_print(); self.flush_print();
match osc { match osc {
OperatingSystemCommand::SetIconNameAndWindowTitle(title) OperatingSystemCommand::SetIconNameSun(title)
| OperatingSystemCommand::SetIconName(title)
| OperatingSystemCommand::SetIconNameAndWindowTitle(title)
| OperatingSystemCommand::SetWindowTitleSun(title) | OperatingSystemCommand::SetWindowTitleSun(title)
| OperatingSystemCommand::SetWindowTitle(title) => { | OperatingSystemCommand::SetWindowTitle(title) => {
self.title = title.clone(); self.title = title.clone();
} }
OperatingSystemCommand::SetIconNameSun(_) | OperatingSystemCommand::SetIconName(_) => {}
OperatingSystemCommand::SetHyperlink(link) => { OperatingSystemCommand::SetHyperlink(link) => {
self.set_hyperlink(link); self.set_hyperlink(link);
} }