# window.JoinOptions

- **Module:** window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/window.rs#L1669
- **Page:** https://libtmux.org/en/rs/latest/reference/window-joinoptions/

Where a pane lands when it is moved into another window.

[`Pane::break_out`] takes a pane out into a window of its own and this puts
one back, so between them a pane can be moved anywhere. tmux spawns nothing
here, which is why this carries none of the command, directory, or
environment a [`SplitOptions`] does: the pane already exists and keeps
everything running in it.

## Example

```rust
use libtmux::{JoinOptions, SplitDirection};

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("moving").await?;
let window = session.active_window().await?.expect("a window");
let second = session.new_window("elsewhere").await?;
let stranded = second.panes().await?.remove(0);

// Put a pane from the other window beside this one.
let here = window.panes().await?.remove(0);
let moved = stranded
    .join_into(&here, JoinOptions::new(SplitDirection::Below))
    .await?;
assert_eq!(moved.window_id(), window.id());

guard.shutdown().await?;
```

## Members

- `new` (method): Land the pane in one direction from the pane it joins.
- `size` (method): Ask for a size rather than letting tmux halve the space.
- `full` (method): Span the window rather than only the pane being joined.
