# LibTmux.FSharp.Pane.findOnScreen

- **Module:** LibTmux.FSharp
- **Package:** LibTmux.FSharp
- **Language:** F#
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux.FSharp/Hierarchy.fsi#L224
- **Page:** https://libtmux.org/en/fsharp/latest/reference/libtmux-fsharp-pane-findonscreen/

```
val findOnScreen:
        cancellationToken: CancellationToken -> search: ScreenSearch -> pane: LibTmux.Pane -> Task<int option>
```

Returns the first visible row showing the text, counted from 1, or None.

tmux searches only the rows on screen. Capture the history and filter its lines to search further back.

## Parameters

- `cancellationToken` (`CancellationToken`)
- `search` (`ScreenSearch`)
- `pane` (`LibTmux.Pane`)

## Raises

- [`System.ArgumentException`](https://learn.microsoft.com/dotnet/api/system.argumentexception): The text cannot be written as a tmux format.
