# cmdq_copy_state

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L237
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmdq_copy_state/

```c
struct cmdq_state * cmdq_copy_state(struct cmdq_state *state)
```

## Parameters

- `state` (`struct cmdq_state *`)

## Called by

- [`load_cfg`](/en/tmux/3.2a/reference/c-function-load_cfg/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cfg.c#L140)
- [`load_cfg_from_buffer`](/en/tmux/3.2a/reference/c-function-load_cfg_from_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cfg.c#L194)

## Calls

- [`cmdq_new_state`](/en/tmux/3.2a/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L239)

## Referenced by

- [`cmd_parse_from_arguments`](/en/tmux/3.2a/reference/c-function-cmd_parse_from_arguments/) (function)

## Referenced declarations

- [`cmdq_state`](/en/tmux/3.2a/reference/c-struct-cmdq_state/) (struct)
- [`cmdq_state.current`](/en/tmux/3.2a/reference/c-struct-cmdq_state-current/) (attribute)
- [`cmdq_state.event`](/en/tmux/3.2a/reference/c-struct-cmdq_state-event/) (attribute)
- [`cmdq_state.flags`](/en/tmux/3.2a/reference/c-struct-cmdq_state-flags/) (attribute)
