# session.Session.previous_window

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/session.rs#L390
- **Page:** https://libtmux.org/reference/rs/session-session-previous_window/

```
session.Session.previous_window(self) -> Result<Option<Window>, Error>
```

Move to the previous window, and return it.

`None` when there is none; see [`Self::next_window`].

# Errors

Returns an error when tmux cannot be reached or refuses the move.
