# window_copy_expand_search_string

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L841
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_expand_search_string/

```c
static int window_copy_expand_search_string(struct window_copy_cmd_state *cs)
```

## Parameters

- `cs` (`struct window_copy_cmd_state *`)

## Called by

- [`window_copy_cmd_search_backward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_search_backward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2042)
- [`window_copy_cmd_search_backward_text`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_search_backward_text/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2062)
- [`window_copy_cmd_search_forward`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_search_forward/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2082)
- [`window_copy_cmd_search_forward_text`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_cmd_search_forward_text/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L2102)

## Calls

- [`args_has`](/en/tmux/3.2a/reference/c-function-args_has/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L851)
- [`format_single`](/en/tmux/3.2a/reference/c-function-format_single/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L852)
- [`xstrdup`](/en/tmux/3.2a/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L862)

## Referenced declarations

- [`args.argc`](/en/tmux/3.2a/reference/c-struct-args-argc/) (attribute)
- [`window_copy_cmd_state.args`](/en/tmux/3.2a/reference/c-struct-window_copy_cmd_state-args/) (attribute)
- [`args.argv`](/en/tmux/3.2a/reference/c-struct-args-argv/) (attribute)
- [`window_mode_entry.data`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-data/) (attribute)
- [`window_copy_mode_data.searchstr`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-searchstr/) (attribute)
- [`window_copy_cmd_state`](/en/tmux/3.2a/reference/c-struct-window_copy_cmd_state/) (struct)
- [`window_copy_cmd_state.wme`](/en/tmux/3.2a/reference/c-struct-window_copy_cmd_state-wme/) (attribute)
- [`window_mode_entry.wp`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-wp/) (attribute)
