# window_copy_get_selection

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

```c
static void * window_copy_get_selection(struct window_mode_entry *, size_t *)
```

## Parameters

- `wme` (`struct window_mode_entry *`)
- `len` (`size_t *`)

## Called by

- [`window_copy_append_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_append_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4152)
- [`window_copy_copy_selection`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_copy_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4137)
- [`window_copy_pipe_run`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_pipe_run/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4099)

## Calls

- [`options_get_number`](/en/tmux/3.2a/reference/c-function-options_get_number/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4013)
- [`window_copy_copy_line`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_copy_line/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L4054)
- [`window_copy_find_length`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_find_length/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3996)
- [`window_copy_match_at_cursor`](/en/tmux/3.2a/reference/c-function-window-copy-c-window_copy_match_at_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3966)
- [`xmalloc`](/en/tmux/3.2a/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-copy.c#L3974)

## Other function references

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

## Referenced declarations

- [`window_copy_mode_data.backing`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-backing/) (attribute)
- [`window_copy_mode_data.cursordrag`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-cursordrag/) (attribute)
- [`screen.cx`](/en/tmux/3.2a/reference/c-struct-screen-cx/) (attribute)
- [`window_copy_mode_data.cx`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-cx/) (attribute)
- [`window_mode_entry.data`](/en/tmux/3.2a/reference/c-struct-window_mode_entry-data/) (attribute)
- [`window_copy_mode_data.endselx`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-endselx/) (attribute)
- [`window_copy_mode_data.endsely`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-endsely/) (attribute)
- [`grid_line.flags`](/en/tmux/3.2a/reference/c-struct-grid_line-flags/) (attribute)
- [`screen.grid`](/en/tmux/3.2a/reference/c-struct-screen-grid/) (attribute)
- [`GRID_LINE_WRAPPED`](/en/tmux/3.2a/reference/c-define-tmux-h-grid_line_wrapped/) (constant)
- [`window_copy_mode_data.lineflag`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-lineflag/) (attribute)
- [`MODEKEY_EMACS`](/en/tmux/3.2a/reference/c-define-tmux-h-modekey_emacs/) (constant)
- [`window.options`](/en/tmux/3.2a/reference/c-struct-window-options/) (attribute)
- [`window_copy_mode_data.rectflag`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-rectflag/) (attribute)
- [`window_copy_mode_data.screen`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-screen/) (attribute)
- [`screen_size_x`](/en/tmux/3.2a/reference/c-define-tmux-h-screen_size_x/) (constant)
- [`screen.sel`](/en/tmux/3.2a/reference/c-struct-screen-sel/) (attribute)
- [`window_copy_mode_data.selx`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-selx/) (attribute)
- [`window_copy_mode_data.sely`](/en/tmux/3.2a/reference/c-struct-window_copy_mode_data-sely/) (attribute)
- [`window_pane.window`](/en/tmux/3.2a/reference/c-struct-window_pane-window/) (attribute)
- [`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)
