SplitWindow.direction
Put the new pane on this side of the one being divided.
Source and package
- Qualified name
-
libtmux::plan:: ops:: panes:: Split Window:: direction - Module
- plan.ops.panes
- Declared in
SplitWindow- Package
- libtmux
- Source
- crates/libtmux/src/plan/ops/panes.rs
- #[must_use] pub const fn direction( mut self, direction: Split
Direction ) -> Self -
Description#
The default is
SplitDirection::Below, which is tmux's.AboveandLeftneed tmux's-b, so they are reachable only through this: withSplitWindow::horizontal()alone a plan could ask for two of the four positions, while the object API'scrate::SplitOptionshas always offered all four.Examples#
use libtmux::SplitDirection;use libtmux::plan::{NewSession, Plan, SplitWindow};let mut plan = Plan::new();let session = plan.add(NewSession::new("above"));plan.add(SplitWindow::new(session.window()).direction(SplitDirection::Above));assert_eq!(plan.len(), 2);- Parameters