- Module
- pane
- Declared in
- Pane
- Package
- libtmux
- Source
- crates/libtmux/src/pane.rs
- Other languages
- Python TypeScript Go Java .NETC++Swift
-
Report whether the pane touches the top edge of its window.
The four edge predicates are what tell a caller a directional move has nowhere to go: a pane at the top has no neighbour above it, so selecting one would wrap or fail rather than move.
Examples
use libtmux::{SplitDirection, SplitOptions};let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("edges").await?;let mut window = session.active_window().await?.expect("a window");// One pane fills the window, so it touches every edge.let only = window.active_pane().await?.expect("a pane");assert!(only.is_at_top() && only.is_at_bottom());// Splitting below leaves the original touching the top and not the// bottom, and the new one the other way round.let lower = window.split(SplitOptions::new(SplitDirection::Below)).await?;let upper = window.panes().await?.into_iter().find(|pane| pane.id() != lower.id()).expect("the original pane");assert!(upper.is_at_top() && !upper.is_at_bottom());assert!(lower.is_at_bottom() && !lower.is_at_top());guard.shutdown().await?;In other ports Whether a pane touches the top of its window
- Python
libtmux.Pane.at_top - TypeScript no equivalent on
Pane - Go
tmux.Pane.AtTop - Java no equivalent on
Pane - .NET
LibTmux.Pane.AtTop - C++
libtmux::Pane::at_top - Swift
Pane.isAtTop
- Python
0 declared, 0 inherited