# cmd_find_valid_state

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

```c
int cmd_find_valid_state(struct cmd_find_state *fs)
```

## Parameters

- `fs` (`struct cmd_find_state *`)

## Called by

- [`cmd_find_target`](/en/tmux/3.2a/reference/c-function-cmd_find_target/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-find.c#L986)
- [`cmdq_fire_command`](/en/tmux/3.2a/reference/c-function-cmd-queue-c-cmdq_fire_command/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-queue.c#L618)
- [`server_check_marked`](/en/tmux/3.2a/reference/c-function-server_check_marked/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/server.c#L99)
- [`window_buffer_build`](/en/tmux/3.2a/reference/c-function-window-buffer-c-window_buffer_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-buffer.c#L190)
- [`window_buffer_get_key`](/en/tmux/3.2a/reference/c-function-window-buffer-c-window_buffer_get_key/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-buffer.c#L304)
- [`window_customize_build`](/en/tmux/3.2a/reference/c-function-window-customize-c-window_customize_build/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-customize.c#L542)
- [`window_customize_check_item`](/en/tmux/3.2a/reference/c-function-window-customize-c-window_customize_check_item/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-customize.c#L157)

## Calls

- [`session_alive`](/en/tmux/3.2a/reference/c-function-session_alive/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-find.c#L671)
- [`window_has_pane`](/en/tmux/3.2a/reference/c-function-window_has_pane/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/cmd-find.c#L684)

## Referenced by

- [`cmdq_new_state`](/en/tmux/3.2a/reference/c-function-cmdq_new_state/) (function)
- [`notify_insert_hook`](/en/tmux/3.2a/reference/c-function-notify-c-notify_insert_hook/) (function)
- [`tty_cmd_erasecharacter`](/en/tmux/3.2a/reference/c-function-tty_cmd_erasecharacter/) (function)

## Referenced declarations

- [`cmd_find_state`](/en/tmux/3.2a/reference/c-struct-cmd_find_state/) (struct)
- [`cmd_find_state.s`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-s/) (attribute)
- [`cmd_find_state.w`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-w/) (attribute)
- [`winlink.window`](/en/tmux/3.2a/reference/c-struct-winlink-window/) (attribute)
- [`session.windows`](/en/tmux/3.2a/reference/c-struct-session-windows/) (attribute)
- [`cmd_find_state.wl`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-wl/) (attribute)
- [`cmd_find_state.wp`](/en/tmux/3.2a/reference/c-struct-cmd_find_state-wp/) (attribute)
