Skip to content

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

Merged
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
apoorva-01:fix/terminal-shift-drag-select
Jul 20, 2026
Merged

terminal: Start a selection on shift+drag when mouse tracking is active#60880
ChristopherBiscardi merged 1 commit into
zed-industries:mainfrom
apoorva-01:fix/terminal-shift-drag-select

Conversation

@apoorva-01

Copy link
Copy Markdown
Contributor

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

Shift is the escape hatch to select text while an app grabs the mouse, but
shift+click only extended an existing selection, so a fresh drag had no anchor
to work from and selected nothing.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jul 13, 2026
@SomeoneToIgnore SomeoneToIgnore added the area:integrations/terminal Feedback for terminal integration, shell commands, etc label Jul 16, 2026

@ChristopherBiscardi ChristopherBiscardi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ChristopherBiscardi ChristopherBiscardi self-assigned this Jul 20, 2026
@ChristopherBiscardi
ChristopherBiscardi added this pull request to the merge queue Jul 20, 2026
Merged via the queue into zed-industries:main with commit 79d238f Jul 20, 2026
48 checks passed
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
…ve (zed-industries#60880)

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

zed-industries#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 zed-industries#60254.

Release Notes:

- Fixed Shift+click-drag not selecting terminal text while an app has
mouse tracking enabled
playdohface pushed a commit to playdohface/zed that referenced this pull request Aug 29, 2026
…ve (zed-industries#60880)

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

zed-industries#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 zed-industries#60254.

Release Notes:

- Fixed Shift+click-drag not selecting terminal text while an app has
mouse tracking enabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations/terminal Feedback for terminal integration, shell commands, etc cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shift+click-drag in the integrated terminal does not select text when mouse tracking is active

3 participants