# window_copy_set_selection

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

```c
static int window_copy_set_selection(struct window_mode_entry *, int, int)
```

## Parameters

- `wme` (`struct window_mode_entry *`)
- `may_redraw` (`int`)
- `no_reset` (`int`)

## Called by

- [`window_copy_start_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_start_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3842)
- [`window_copy_update_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_update_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3887)

## Calls

- [`screen_hide_selection`](/en/tmux/3.2a/reference/c-function-screen_hide_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3917)
- [`screen_set_selection`](/en/tmux/3.2a/reference/c-function-screen_set_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3924)
- [`style_apply`](/en/tmux/3.2a/reference/c-function-style_apply/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3922)
- [`window_copy_adjust_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_adjust_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3907)
- [`window_copy_redraw_lines`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_redraw_lines/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3936)
- [`window_copy_synchronize_cursor`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_synchronize_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3902)

## Referenced declarations

- [`grid_cell.data`](/en/tmux/3.2a/reference/c-struct-grid_cell-data/) (attribute)
- [`window_mode_entry.data`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-data/) (attribute)
- [`grid_cell.flags`](/en/tmux/3.2a/reference/c-struct-grid_cell-flags/) (attribute)
- [`GRID_FLAG_NOPALETTE`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_flag_nopalette/) (constant)
- [`window.options`](/en/tmux/3.2a/reference/c-struct-window-options/) (attribute)
- [`window_copy_mode_data.screen`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-screen/) (attribute)
- [`window_pane.window`](/en/tmux/3.2a/reference/c-struct-window_pane-window/) (attribute)
- [`WINDOW_COPY_REL_POS_ON_SCREEN`](/en/tmux/3.2a/reference/c-enum-window-copy-c-022115236274055101041127131067314202307340154203-window_copy_rel_pos_on_screen/) (constant)
- [`window_mode_entry`](/en/tmux/3.2a/reference/c-struct-window_mode_entry/) (struct)
- [`window_mode_entry.wp`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-wp/) (attribute)
