# session_renumber_windows

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L693
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-session_renumber_windows/

```c
void session_renumber_windows(struct session *s)
```

## Parameters

- `s` (`struct session *`)

## Called by

- [`cmd_move_window_exec`](/en/tmux/latest/reference/c-function-cmd-move-window-c-cmd_move_window_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-move-window.c#L77)
- [`server_renumber_session`](/en/tmux/latest/reference/c-function-server_renumber_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/server-fn.c#L232)

## Calls

- [`options_get_number`](/en/tmux/latest/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L705)
- [`server_clear_marked`](/en/tmux/latest/reference/c-function-server_clear_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L739)
- [`winlink_add`](/en/tmux/latest/reference/c-function-winlink_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L710)
- [`winlink_find_by_index`](/en/tmux/latest/reference/c-function-winlink_find_by_index/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L737)
- [`winlink_find_by_window`](/en/tmux/latest/reference/c-function-winlink_find_by_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L728)
- [`winlink_remove`](/en/tmux/latest/reference/c-function-winlink_remove/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L745)
- [`winlink_set_window`](/en/tmux/latest/reference/c-function-winlink_set_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/session.c#L712)

## Referenced declarations

- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`winlink.flags`](/en/tmux/latest/reference/c-struct-winlink-flags/) (attribute)
- [`winlink.idx`](/en/tmux/latest/reference/c-struct-winlink-idx/) (attribute)
- [`session.lastw`](/en/tmux/latest/reference/c-struct-session-lastw/) (attribute)
- [`marked_pane`](/en/tmux/latest/reference/c-variable-marked_pane/) (attribute)
- [`session.options`](/en/tmux/latest/reference/c-struct-session-options/) (attribute)
- [`session`](/en/tmux/latest/reference/c-struct-session/) (struct)
- [`winlink.session`](/en/tmux/latest/reference/c-struct-winlink-session/) (attribute)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`session.windows`](/en/tmux/latest/reference/c-struct-session-windows/) (attribute)
- [`WINLINK_ALERTFLAGS`](/en/tmux/latest/reference/c-define-tmux-h-winlink_alertflags/) (constant)
- [`WINLINK_VISITED`](/en/tmux/latest/reference/c-define-tmux-h-winlink_visited/) (constant)
- [`cmd_find_state.wl`](/en/tmux/latest/reference/c-struct-cmd_find_state-wl/) (attribute)
