# tty_cmd_setselection

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1891
- **Page:** https://libtmux.org/en/tmux/3.2a/reference/c-function-tty_cmd_setselection/

```c
void tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx)
```

## Parameters

- `tty` (`struct tty *`)
- `ctx` (`const struct tty_ctx *`)

## Calls

- [`tty_set_selection`](/en/tmux/3.2a/reference/c-function-tty_set_selection/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/tty.c#L1893)

## Referenced by

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

## Referenced declarations

- [`tty_ctx.num`](/en/tmux/3.2a/reference/c-struct-tty_ctx-num/) (attribute)
- [`tty_ctx.ptr`](/en/tmux/3.2a/reference/c-struct-tty_ctx-ptr/) (attribute)
- [`tty`](/en/tmux/3.2a/reference/c-struct-tty/) (struct)
- [`tty_ctx`](/en/tmux/3.2a/reference/c-struct-tty_ctx/) (struct)
