# cmdq_copy_state

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L239
- **Page:** https://libtmux.org/en/tmux/3.7c/reference/c-function-cmdq_copy_state/

```c
struct cmdq_state * cmdq_copy_state(struct cmdq_state *state, struct cmd_find_state *current)
```

## Parameters

- `state` (`struct cmdq_state *`)
- `current` (`struct cmd_find_state *`)

## Called by

- [`load_cfg`](/en/tmux/3.7c/reference/c-function-load_cfg/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L136)
- [`load_cfg_from_buffer`](/en/tmux/3.7c/reference/c-function-load_cfg_from_buffer/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cfg.c#L188)

## Calls

- [`cmdq_new_state`](/en/tmux/3.7c/reference/c-function-cmdq_new_state/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-queue.c#L242)

## Referenced by

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

## Referenced declarations

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