# session_previous

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L441
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-session_previous/

```c
int session_previous(struct session *s, int alert)
```

## Parameters

- `s` (`struct session *`)
- `alert` (`int`)

## Called by

- [`cmd_select_window_exec`](/en/tmux/3.2a/reference/c-function-cmd-select-window-c-cmd_select_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-select-window.c#L113)

## Calls

- [`session_previous_alert`](/en/tmux/3.2a/reference/c-function-session-c-session_previous_alert/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L450)
- [`session_set_current`](/en/tmux/3.2a/reference/c-function-session_set_current/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L456)
- [`winlink_previous`](/en/tmux/3.2a/reference/c-function-winlink_previous/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/session.c#L448)

## Referenced by

- [`session_detach`](/en/tmux/3.2a/reference/c-function-session_detach/) (function)
- [`session_group_synchronize1`](/en/tmux/3.2a/reference/c-function-session-c-session_group_synchronize1/) (function)
- [`session_new`](/en/tmux/3.2a/reference/c-function-session_new/) (function)

## Referenced declarations

- [`session.curw`](/en/tmux/3.2a/reference/c-struct-session-curw/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`session.windows`](/en/tmux/3.2a/reference/c-struct-session-windows/) (attribute)
