# terminal: Handle shift\+click selection \(\#25143\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/48417866ccaf2e5e7c0ede81d2cbc63f900fe06b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 48417866ccaf2e5e7c0ede81d2cbc63f900fe06b

Requested commit: 48417866ccaf2e5e7c0ede81d2cbc63f900fe06b

Commit: 48417866ccaf2e5e7c0ede81d2cbc63f900fe06b

Tree: 67475488d2fb6c6514e1444eeb71cfe5bc886e03

Author: smit

Committer: GitHub

## Message

```
terminal: Handle shift+click selection (#25143)

Closes #16951

Handle the case where you click on the terminal while pressing Shift. 

Instead of setting a new selection head, we simply update the selection
to that point. This allows you to repeatedly extend the selection to new
points by pressing Shift while preserving the original selection head.

Preview:

Selection works in direct terminal, but doesn't on Vim like program,
which is expected.


https://github.com/user-attachments/assets/e46987d8-a9a3-495d-8dd9-98d461317a8d


Release Notes:

- Added ability to extend selection with Shift + click in the terminal.
```

## Parents

- [1fa105eaa5705306d979f5a492fd10b122bbda37](https://git.cafe/gitcafe/zed/commit/1fa105eaa5705306d979f5a492fd10b122bbda37?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/48417866ccaf2e5e7c0ede81d2cbc63f900fe06b?format=markdown)
