mirror of
https://github.com/wez/wezterm.git
synced 2024-11-27 02:25:28 +03:00
mux: fix tab title at attach time
We were ignoring the title returned by list tabs and would subsequently only pick up the title after a later update. This passes the title in at construction.
This commit is contained in:
parent
94b78a47c8
commit
9f270c25e7
@ -179,7 +179,7 @@ impl Domain for ClientDomain {
|
||||
|
||||
result.tab_id
|
||||
};
|
||||
let tab: Rc<dyn Tab> = Rc::new(ClientTab::new(&inner, remote_tab_id, size));
|
||||
let tab: Rc<dyn Tab> = Rc::new(ClientTab::new(&inner, remote_tab_id, size, "wezterm"));
|
||||
let mux = Mux::get().unwrap();
|
||||
mux.add_tab(&tab)?;
|
||||
mux.add_tab_to_window(&tab, window)?;
|
||||
@ -211,7 +211,12 @@ impl Domain for ClientDomain {
|
||||
entry.window_id,
|
||||
entry.title
|
||||
);
|
||||
let tab: Rc<dyn Tab> = Rc::new(ClientTab::new(&inner, entry.tab_id, entry.size));
|
||||
let tab: Rc<dyn Tab> = Rc::new(ClientTab::new(
|
||||
&inner,
|
||||
entry.tab_id,
|
||||
entry.size,
|
||||
&entry.title,
|
||||
));
|
||||
mux.add_tab(&tab)?;
|
||||
|
||||
if let Some(local_window_id) = inner.remote_to_local_window(entry.window_id) {
|
||||
|
@ -128,7 +128,12 @@ pub struct ClientTab {
|
||||
}
|
||||
|
||||
impl ClientTab {
|
||||
pub fn new(client: &Arc<ClientInner>, remote_tab_id: TabId, size: PtySize) -> Self {
|
||||
pub fn new(
|
||||
client: &Arc<ClientInner>,
|
||||
remote_tab_id: TabId,
|
||||
size: PtySize,
|
||||
title: &str,
|
||||
) -> Self {
|
||||
let local_tab_id = alloc_tab_id();
|
||||
let writer = TabWriter {
|
||||
client: Arc::clone(client),
|
||||
@ -161,7 +166,7 @@ impl ClientTab {
|
||||
scrollback_top: 0,
|
||||
},
|
||||
lines: LruCache::unbounded(),
|
||||
title: "wezterm".to_string(),
|
||||
title: title.to_string(),
|
||||
}),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user