# LibTmux.Session.SelectPreviousWindowAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Session.Lifecycle.cs#L171
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-session-selectpreviouswindowasync/

tmux command: [`previous-window`](/en/tmux/latest/manual/previous-window/)

```
LibTmux.Session.SelectPreviousWindowAsync(cancellationToken: CancellationToken) -> Task<Window>
```

Selects the previous window.

## Parameters

- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

The window that is active afterwards.
