# terminal: Start a selection on shift\+drag when mouse tracking is active \(\#60880\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 79d238f6fdde25388786c9690ef10a1d3e0319b3

Requested commit: 79d238f6fdde25388786c9690ef10a1d3e0319b3

Commit: 79d238f6fdde25388786c9690ef10a1d3e0319b3

Tree: b239a3c71f8d0007f6f6f621c1b15c78d839d9d8

Author: Apoorva Verma

Committer: GitHub

## Message

```
terminal: Start a selection on shift+drag when mouse tracking is active (#60880)

run htop or btm and you can't select terminal text with shift+drag, the
usual escape hatch does nothing.

#25143 made shift+click only ever extend a selection, never start one.
so with nothing selected there's no anchor and the drag has nothing to
grab. now it drops an anchor when there's no selection, and still
extends when there is.

added two event-level tests (harness can't sync without a window):
shift+drag under mouse tracking, which fails without the fix, and
shift+click still extending.

Fixes #60254.

Release Notes:

- Fixed Shift+click-drag not selecting terminal text while an app has
mouse tracking enabled
```

## Parents

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

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