- Module
- pane
- Declared in
- Pane
- Package
- libtmux
- Source
- packages/libtmux/src/pane.ts
- Other languages
- PythonRubyLuaRustGoJava.NETC++Swift
-
Move this pane out into a window of its own, in the session it is in.
tmux places a break with no destination in whichever session is current, which is the attached one rather than this pane's.
In other ports Move a pane out into a window of its own
Examples
await pane.breakOut("extracted");>>> pane_to_break = window.split(shell='sleep 1m')>>> new_window = pane_to_break.break_pane(window_name='broken')>>> new_window.window_name'broken'use libtmux::{SplitDirection, SplitOptions};
let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("broken-out").await?;let pane = session.panes().await?.remove(0);let stays = pane.window_id().clone();
let moved = pane.split(SplitOptions::new(SplitDirection::Below)).await?;let moved = moved.break_out().await?;
// The window it landed in, without listing the server to find it.assert_ne!(moved.window_id(), &stays);0 declared, 0 inherited