# cmd_move_window_exec

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L60
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-cmd-move-window-c-cmd_move_window_exec/

tmux command: [`link-window`](/en/tmux/3.2a/manual/link-window/)

tmux command: [`move-window`](/en/tmux/3.2a/manual/move-window/)

```c
static enum cmd_retval cmd_move_window_exec(struct cmd *, struct cmdq_item *)
```

## Parameters

- `self` (`struct cmd *`)
- `item` (`struct cmdq_item *`)

## Calls

- [`args_get`](/en/tmux/3.2a/reference/c-function-args_get/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L65)
- [`args_has`](/en/tmux/3.2a/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L72)
- [`cmd_find_target`](/en/tmux/3.2a/reference/c-function-cmd_find_target/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L73)
- [`cmd_get_args`](/en/tmux/3.2a/reference/c-function-cmd_get_args/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L62)
- [`cmd_get_entry`](/en/tmux/3.2a/reference/c-function-cmd_get_entry/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L108)
- [`cmdq_error`](/en/tmux/3.2a/reference/c-function-cmdq_error/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L104)
- [`cmdq_get_source`](/en/tmux/3.2a/reference/c-function-cmdq_get_source/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L63)
- [`recalculate_sizes`](/en/tmux/3.2a/reference/c-function-recalculate_sizes/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L78)
- [`server_link_window`](/en/tmux/3.2a/reference/c-function-server_link_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L103)
- [`server_status_session`](/en/tmux/3.2a/reference/c-function-server_status_session/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L79)
- [`server_unlink_window`](/en/tmux/3.2a/reference/c-function-server_unlink_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L109)
- [`session_renumber_windows`](/en/tmux/3.2a/reference/c-function-session_renumber_windows/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L77)
- [`winlink_shuffle_up`](/en/tmux/3.2a/reference/c-function-winlink_shuffle_up/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-move-window.c#L96)

## Other function references

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

## Referenced by

- [`cmd_link_window_entry`](/en/tmux/3.2a/reference/c-variable-cmd_link_window_entry/) (attribute)
- [`cmd_move_window_entry`](/en/tmux/3.2a/reference/c-variable-cmd_move_window_entry/) (attribute)

## Referenced declarations

- [`cmd`](/en/tmux/3.2a/reference/c-struct-cmd/) (struct)
- [`CMD_FIND_QUIET`](/en/tmux/3.2a/reference/c-define-tmux-h-cmd_find_quiet/) (constant)
- [`CMD_FIND_SESSION`](/en/tmux/3.2a/reference/c-enum-cmd_find_type-cmd_find_session/) (constant)
- [`CMD_FIND_WINDOW`](/en/tmux/3.2a/reference/c-enum-cmd_find_type-cmd_find_window/) (constant)
- [`CMD_FIND_WINDOW_INDEX`](/en/tmux/3.2a/reference/c-define-tmux-h-cmd_find_window_index/) (constant)
- [`cmd_move_window_entry`](/en/tmux/3.2a/reference/c-variable-cmd_move_window_entry/) (attribute)
- [`CMD_RETURN_ERROR`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_error/) (constant)
- [`CMD_RETURN_NORMAL`](/en/tmux/3.2a/reference/c-enum-cmd_retval-cmd_return_normal/) (constant)
- [`cmd_retval`](/en/tmux/3.2a/reference/c-enum-cmd_retval/) (enum)
- [`cmdq_item`](/en/tmux/3.2a/reference/c-struct-cmdq_item/) (struct)
- [`session.curw`](/en/tmux/3.2a/reference/c-struct-session-curw/) (attribute)
- [`cmd_find_state.idx`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-idx/) (attribute)
- [`winlink.idx`](/en/tmux/3.2a/reference/c-struct-winlink-idx/) (attribute)
- [`session.options`](/en/tmux/3.2a/reference/c-struct-session-options/) (attribute)
- [`cmd_find_state.s`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-s/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-wl/) (attribute)
