window.JoinOptions
Rust
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
Where a pane lands when it is moved into another window.
Pane::break_outtakes 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 aSplitOptionsdoes: the pane already exists and keeps everything running in it.Examples
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?;
3 declared, 0 inherited