microsoft / microsoft/terminal

Weird focus change after multiline paste

Open
#17,308 0 comments 0 reactions 0 assignees View on GitHub
Area-UserInterface Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.21.1272.0

### Windows build number

10.0.19045.4412

### Other Software

_No response_

### Steps to reproduce

1. Enable the `rightClickContextMenu` option.
2. Enable the `multiLinePasteWarning` option.
3. Copy multiple lines of text to the clipboard from somewhere.
4. Open two cmd shell tabs.
5. In the second tab, execute the following command: `copy con somefilename.txt`
6. Right click in the terminal window and choose the paste option from the context menu.
7. When the warning dialog appears, select *Paste anyway*.
8. Once the text has pasted, press Ctrl+Z then Enter.

### Expected Behavior

You should see `1 files(s) copied` and the pasted content should be written to the file.

### Actual Behavior

The Ctrl+Z key press has no effect, and Enter switches the focus to the first tab.

Contributor guide

Open the contributing guide

Research direction

Reproduce the sequence in Windows Terminal 1.21.1272.0 on Windows 10.0.19045.4412, using two cmd tabs, multiline paste, Ctrl+Z, and Enter. Done means Ctrl+Z is accepted, Enter completes copy con, the content is written, and the first tab does not receive focus.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, shell
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.