Server.capture(_:since:limit:)
Swift
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift
- Declared in
- Server
- Package
- libtmux-swift
- Source
- Sources/LibTmux/CaptureSince.swift
- capture(_:since:limit:) ( pane : Pane , since : CaptureCursor? , limit : Int ) IncrementalCapture
-
Reads only what a pane has printed since
cursor.Watching a pane by capturing it repeatedly sends the whole screen every time, nearly all of which the caller has already seen — which for an agent is context spent on nothing. This sends the difference.
Pass
nilto start: the first read establishes where the pane is without returning its backlog, so a watcher begins at "from now on" rather than with a screenful of history. The source read is capped at 1 MiB; a wider result fails instead of allocating output the line limit would later discard.- Parameters:
- pane: the pane to read.
- cursor: where the last read stopped, or
nilto start watching. - limit: the most lines to return, keeping the newest.
- Raises
- Parameters:
0 declared, 0 inherited