# tmux.Session.PreviousWindow

- **Module:** tmux.Session
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/session_navigation.go#L47
- **Page:** https://libtmux.org/reference/go/tmux-session-previouswindow/

```
tmux.Session.PreviousWindow(ctx: context.Context) -> (Window, error)
```

PreviousWindow makes the previous winlink current in the receiver session and returns that freshly materialized session-specific [Window]. The selection is session-scoped; it does not promise focus for clients attached to other sessions. A transport or context error can be delivery-ambiguous and no rollback is attempted. Command or refresh failure returns a zero Window.
