summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/ansi.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/ansi.rs')
-rw-r--r--alacritty_terminal/src/ansi.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index 1c1c7cd5..a5f8564b 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -154,7 +154,7 @@ pub trait TermInfo {
/// writing specific handler impls for tests far easier.
pub trait Handler {
/// OSC to set window title
- fn set_title(&mut self, _: &str) {}
+ fn set_title(&mut self, _: Option<String>) {}
/// Set the cursor style
fn set_cursor_style(&mut self, _: Option<CursorStyle>) {}
@@ -771,8 +771,10 @@ where
.iter()
.flat_map(|x| str::from_utf8(x))
.collect::<Vec<&str>>()
- .join(";");
- self.handler.set_title(&title);
+ .join(";")
+ .trim()
+ .to_owned();
+ self.handler.set_title(Some(title));
return;
}
unhandled(params);