1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-09 22:15:15 +03:00

avoid allocating an empty window id

This prevents logging a message about a window being removed
from being printed at startup when connecting to a remote mux.
This commit is contained in:
Wez Furlong 2020-01-17 23:43:14 -08:00
parent a773d74bf8
commit 78ab99e0d0

View File

@ -488,7 +488,6 @@ async fn spawn_tab_in_default_domain_if_mux_is_empty(
if !mux.is_empty() {
return Ok(());
}
let window_id = mux.new_empty_window();
let domain = mux.default_domain();
domain.attach().await?;
@ -496,6 +495,7 @@ async fn spawn_tab_in_default_domain_if_mux_is_empty(
return Ok(());
}
let window_id = mux.new_empty_window();
let tab = mux
.default_domain()
.spawn(PtySize::default(), cmd, None, window_id)