# format_add_window_neighbor

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

```c
static void format_add_window_neighbor(struct format_tree *nft, struct winlink *wl, struct session *s, const char *prefix)
```

## Parameters

- `nft` (`struct format_tree *`)
- `wl` (`struct winlink *`)
- `s` (`struct session *`)
- `prefix` (`const char *`)

## Called by

- [`format_loop_windows`](/en/tmux/latest/reference/c-function-format-c-format_loop_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4789)

## Calls

- [`format_add`](/en/tmux/latest/reference/c-function-format_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4718)
- [`options_first`](/en/tmux/latest/reference/c-function-options_first/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4725)
- [`options_name`](/en/tmux/latest/reference/c-function-options_name/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4727)
- [`options_next`](/en/tmux/latest/reference/c-function-options_next/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4735)
- [`options_to_string`](/en/tmux/latest/reference/c-function-options_to_string/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4730)
- [`xasprintf`](/en/tmux/latest/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L4717)

## Referenced declarations

- [`session.curw`](/en/tmux/latest/reference/c-struct-session-curw/) (attribute)
- [`format_tree`](/en/tmux/latest/reference/c-struct-format_tree/) (struct)
- [`winlink.idx`](/en/tmux/latest/reference/c-struct-winlink-idx/) (attribute)
- [`window.options`](/en/tmux/latest/reference/c-struct-window-options/) (attribute)
- [`session`](/en/tmux/latest/reference/c-struct-session/) (struct)
- [`winlink.window`](/en/tmux/latest/reference/c-struct-winlink-window/) (attribute)
- [`winlink`](/en/tmux/latest/reference/c-struct-winlink/) (struct)
