# tmux.Session.SelectWindow

- **Module:** tmux.Session
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/session_navigation.go#L59
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-session-selectwindow/

```
tmux.Session.SelectWindow(ctx: context.Context, request: SelectWindowRequest) -> (Window, error)
```

SelectWindow makes one winlink current in the receiver session and returns that freshly materialized session-specific [Window]. WindowID is combined with the receiver SessionID, because a WindowID alone does not distinguish linked views. The selection is session-scoped; it does not promise focus for clients attached to other sessions.

Command or refresh failures return zero because the selected view cannot be
identified without refresh. Transport errors are delivery-ambiguous.
