Window.resize_by
Resize the window to an exact size in cells.
Source and package
- Qualified name
-
libtmux::window:: Window:: resize _by - Module
- window
- Declared in
Window- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
-
Description#
Errors
Returns an error when tmux refuses the size. Move one edge of the window by a number of cells.
This is the form a keybinding uses: "make it two columns wider" rather than a size computed from the current one.
Errors
Returns an error when tmux refuses the resize.
Examples#
use libtmux::ResizeDirection;let session = server.new_session("resized-window").await?;let mut window = session.windows().await?.remove(0);window.resize(80, 24).await?;window.resize_by(ResizeDirection::Down, 4).await?;assert_eq!(window.height(), 28);
tmux command#
The tmux commands behind resize_by.
tmux C API#
The C declarations in tmux that implement these commands.