diff --git a/docs/changelog.md b/docs/changelog.md index c04e92464..9d8c747e3 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -14,6 +14,7 @@ As features stabilize some brief notes about them will accumulate here. #### Fixed * [ActivateKeyTable](config/lua/keyassignment/ActivateKeyTable.md)'s `replace_current` field was not actually optional. Made it optional. [#2179](https://github.com/wez/wezterm/issues/2179) * `winget` causes toast notification spam [#2185](https://github.com/wez/wezterm/issues/2185) +* `wezterm connect sshdomain` could hang on startup if password authentication was required [#2194](https://github.com/wez/wezterm/issues/2194) ### 20220624-141144-bd1b7c5d diff --git a/wezterm-gui/src/main.rs b/wezterm-gui/src/main.rs index 30d3179ee..62035fe87 100644 --- a/wezterm-gui/src/main.rs +++ b/wezterm-gui/src/main.rs @@ -295,9 +295,14 @@ async fn spawn_tab_in_default_domain_if_mux_is_empty( } } - let window_id = mux.new_empty_window(None); + let window_id = { + // Force the builder to notify the frontend early, + // so that the attach await below doesn't block it + let builder = mux.new_empty_window(None); + *builder + }; - domain.attach(Some(*window_id)).await?; + domain.attach(Some(window_id)).await?; let have_panes_in_domain = mux .iter_panes() @@ -322,7 +327,7 @@ async fn spawn_tab_in_default_domain_if_mux_is_empty( let dpi = config.dpi.unwrap_or_else(|| ::window::default_dpi()) as u32; let _tab = domain - .spawn(config.initial_size(dpi), cmd, None, *window_id) + .spawn(config.initial_size(dpi), cmd, None, window_id) .await?; Ok(()) }