pane.CaptureOptions
Rust
- Python Unavailable
- TypeScript Unavailable
- Rust
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- pane
- Package
- libtmux
- Source
- crates/libtmux/src/pane.rs
-
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.
Examples
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?;
9 declared, 0 inherited
Members
- end method End the capture at a line.
- escape_sequences method Keep the terminal escape sequences rather than the text alone.
- history method Capture everything tmux still holds, scrollback included.
- join_wrapped method Return a wrapped line as one line rather than as the rows it occupies.
- pending_escape method Capture the escape sequence the pane has begun but not finished.
- start method Start the capture at a line.
- 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.
- visible method Capture the visible screen, which is what tmux does by default.