# pane.CaptureOptions

- **Module:** pane
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/pane.rs#L1443
- **Page:** https://libtmux.org/en/rs/latest/reference/pane-captureoptions/

How far back a capture reaches, and in what form.

Line numbers follow tmux: zero is the top of the visible screen, negative
numbers are scrollback, and positive numbers run down the screen.

## Example

```rust
use libtmux::CaptureOptions;

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("capture").await?;
let window = session.active_window().await?.expect("a session has a window");
let pane = window.active_pane().await?.expect("a window has a pane");

// The constructors name the two questions people actually ask, rather
// than making a caller remember that zero is the top of the screen.
let visible = pane.capture_with(CaptureOptions::visible()).await?;
let everything = pane.capture_with(CaptureOptions::history()).await?;
assert!(everything.len() >= visible.len());

guard.shutdown().await?;
```

## Members

- `visible` (method): Capture the visible screen, which is what tmux does by default.
- `history` (method): Capture everything tmux still holds, scrollback included.
- `start` (method): Start the capture at a line.
- `end` (method): End the capture at a line.
- `escape_sequences` (method): Keep the terminal escape sequences rather than the text alone.
- `trailing_spaces` (method): Keep the spaces tmux would otherwise strip from each line's end.
- `trim_blank_cells` (method): Drop the positions at each line's end that hold no character at all.
- `pending_escape` (method): Capture the escape sequence the pane has begun but not finished.
- `join_wrapped` (method): Return a wrapped line as one line rather than as the rows it occupies.
