# Server.capture(_:since:limit:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/CaptureSince.swift#L36
- **Page:** https://libtmux.org/reference/swift/server-capture(_-since-limit-)/

```
Server.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 `nil` to 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 `nil` to start watching.
  - limit: the most lines to return, keeping the newest.

## Raises

- `TmuxError`
