when attaching, don't spawn a new window unless nothing attached
This commit is contained in:
1 parent
7b7258d410
commit
abe656f51a
1 file changed
+7
-5
+7
-5
@@ -147,11 +147,13 @@ fn run_terminal_gui(config: Arc<config::Config>, opts: &StartCommand) -> Result<
|
||||
|
||||
domain.attach()?;
|
||||
|
||||
let window_id = mux.new_empty_window();
|
||||
let tab = mux
|
||||
.default_domain()
|
||||
.spawn(PtySize::default(), cmd, window_id)?;
|
||||
gui.spawn_new_window(mux.config(), &fontconfig, &tab, window_id)?;
|
||||
if mux.is_empty() {
|
||||
let window_id = mux.new_empty_window();
|
||||
let tab = mux
|
||||
.default_domain()
|
||||
.spawn(PtySize::default(), cmd, window_id)?;
|
||||
gui.spawn_new_window(mux.config(), &fontconfig, &tab, window_id)?;
|
||||
}
|
||||
|
||||
gui.run_forever()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user