Skip to content

Fix copy keybinding to prioritize input text over selected blocks (APP-4330)#9491

Merged
seemeroland merged 1 commit intomasterfrom
roland/app-4330
May 4, 2026
Merged

Fix copy keybinding to prioritize input text over selected blocks (APP-4330)#9491
seemeroland merged 1 commit intomasterfrom
roland/app-4330

Conversation

@seemeroland
Copy link
Copy Markdown
Contributor

@seemeroland seemeroland commented Apr 29, 2026

Description

Fixes APP-4330: the global Copy keybinding (Ctrl/Cmd-Shift-C) was copying selected block content even when the user had text highlighted in the input editor.

You can have a block selected and text highlighted in the input editor at the same time. In that case, the user almost always intends to copy the actively-selected input text, not the block.

This change updates TerminalView::copy to check for selected text in the input editor before falling back to copying selected blocks. The priority is now:

  1. Selected text in CLI subagent views (unchanged)
  2. Selected text in the cloud mode error screen (unchanged)
  3. Selected text in the terminal grid / block (unchanged)
  4. Selected text in the input editor (new)
  5. Selected blocks (unchanged)

Testing

Manual testing:

  • Select a block (block card is highlighted) AND highlight text in the input editor.
  • Press Ctrl/Cmd-Shift-C.
  • Confirm the highlighted input text is copied to the clipboard, not the block contents.
  • Confirm copying still works as before when only a block is selected, when only block grid text is selected, etc.

https://www.loom.com/share/573b5d4a75ca42a8ad6c40900363edbd

Server API dependencies

N/A — client-only change.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-BUG-FIX: Copy keybinding now prioritizes selected text in the input over a selected block when both are active.

Previously, when a block was selected and the user had highlighted text
in the input editor, hitting Ctrl/Cmd-Shift-C copied the block content
instead of the selected input text. Both selections can coexist, and
the user almost always intends to copy the actively selected input.

Update TerminalView::copy to check for selected input text right before
falling back to copying selected blocks.

Linear: APP-4330

Co-Authored-By: Oz <[email protected]>
@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@seemeroland seemeroland marked this pull request as ready for review April 29, 2026 21:17
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented Apr 29, 2026

@seemeroland

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and posted feedback on this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

Overview

This PR updates TerminalView::copy so selected input editor text is copied before falling back to selected blocks, while preserving the existing higher-priority CLI subagent, cloud error, and terminal grid selection behavior.

Concerns

  • No correctness or security concerns found in the changed diff lines.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@seemeroland seemeroland merged commit 5fe2735 into master May 4, 2026
49 checks passed
@seemeroland seemeroland deleted the roland/app-4330 branch May 4, 2026 18:55
wolverine2k pushed a commit to wolverine2k/warp that referenced this pull request May 5, 2026
…P-4330) (warpdotdev#9491)

## Description
Fixes [APP-4330](https://linear.app/warp/issue/APP-4330): the global
Copy keybinding (Ctrl/Cmd-Shift-C) was copying selected block content
even when the user had text highlighted in the input editor.

You can have a block selected and text highlighted in the input editor
at the same time. In that case, the user almost always intends to copy
the actively-selected input text, not the block.

This change updates `TerminalView::copy` to check for selected text in
the input editor before falling back to copying selected blocks. The
priority is now:
1. Selected text in CLI subagent views (unchanged)
2. Selected text in the cloud mode error screen (unchanged)
3. Selected text in the terminal grid / block (unchanged)
4. **Selected text in the input editor (new)**
5. Selected blocks (unchanged)

## Testing
Manual testing:
- Select a block (block card is highlighted) AND highlight text in the
input editor.
- Press Ctrl/Cmd-Shift-C.
- Confirm the highlighted input text is copied to the clipboard, not the
block contents.
- Confirm copying still works as before when only a block is selected,
when only block grid text is selected, etc.

https://www.loom.com/share/573b5d4a75ca42a8ad6c40900363edbd

## Server API dependencies
N/A — client-only change.

## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

## Changelog Entries for Stable

CHANGELOG-BUG-FIX: Copy keybinding now prioritizes selected text in the
input over a selected block when both are active.

Co-authored-by: Oz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants