Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-rs latest

CaptureOptions.trim_blank_cells

Drop the positions at each line's end that hold no character at all.

Source and package
Qualified name
libtmux::pane::CaptureOptions::trim_blank_cells
Module
pane
Declared in
CaptureOptions
Package
libtmux
Source
crates/libtmux/src/pane.rs
#[must_use = "options describe a capture but do not perform one" ] pub const fn trim_blank_cells(mut self) -> Self

Description#

A pane's grid is rectangular, so a short line is padded with cells that were never written. tmux includes them unless told not to; this is its -T. Distinct from Self::trailing_spaces(), which is about spaces a program actually printed -- one asks for the pane's shape, the other for what was written into it.

Self::join_wrapped() implies this.

Examples#

use libtmux::CaptureOptions;
let written = CaptureOptions::visible().trim_blank_cells();
assert_ne!(written, CaptureOptions::visible());
Esc

Type to search.

Reference previewOpen reference