Pane.toggle_zoom
Zoom the pane to fill its window, or restore it if it already fills it.
Source and package
- Qualified name
-
libtmux::pane:: Pane:: toggle _zoom - Module
- pane
- Declared in
Pane- Package
- libtmux
- Source
- crates/libtmux/src/pane.rs
-
Description#
tmux models this as one toggle rather than two operations, and
Window::is_zoomed()reports which way it went.Errors
Returns an error when tmux refuses the request.
Examples#
use libtmux::{SplitDirection, SplitOptions};let session = server.new_session("zoomed").await?;let pane = session.panes().await?.remove(0);pane.split(SplitOptions::new(SplitDirection::Below).command("sleep 300")).await?;let mut pane = pane.refreshed().await?;pane.toggle_zoom().await?;assert!(pane.window().await?.expect("the window").is_zoomed());pane.toggle_zoom().await?;assert!(!pane.window().await?.expect("the window").is_zoomed());
tmux command#
The tmux commands behind toggle_zoom.
tmux C API#
The C declarations in tmux that implement these commands.