microsoft / microsoft/terminal

Switching OS input method resets Terminal colors and zoom

Open
#11,522 31 comments 28 reactions 0 assignees View on GitHub
Area-Settings Area-TerminalControl In-PR Issue-Bug Priority-3 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version (or Windows build number)

Windows 11
Version: 10.0.22000.258

Windows Terminal Preview
Version: 1.11.2731.0

### Other Software

Bash (in WSL)

### Steps to reproduce

1. Inside a `xterm` terminal, override the terminal's colors using escape sequences such as:

```sh
# Set "red" color to hex(ab4642)
printf '\033]4;%d;rgb:%s\033\\' 1 'ab/46/42';
# Set "background" color to hex(181818)
printf '\033]%d;rgb:%s\033\\' 11 '18/18/18';
```

The full theme I use can be applied using the following script https://github.com/fnune/base16-shell/blob/master/scripts/base16-default-dark.sh. This method allows me to conveniently switch between dark and light themes, regardless of the OS I'm currently using.

1. Assuming you have multiple input methods configured in Windows (e.g. I switch between "US" and "US-International" regularly), press either Ctrl+Shift or Win+Space to switch between input methods.

Switching input from the task bar using the mouse also triggers this bug.

### Expected Behavior

Switching input methods in Windows has no impact on the configuration of my open Terminal sessions.

### Actual Behavior

The terminal's colors get reset to the color scheme configured in Terminal for the current session.

Before switching input methods:
![image](https://user-images.githubusercontent.com/3299086/137630114-fa360dfd-8ad3-43ce-9a2e-da3b80ac3769.png)

After switching input methods:
![image](https://user-images.githubusercontent.com/3299086/137630110-7b9c5deb-3a32-4ec3-be30-4d43ba092902.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce on Windows 11 with Windows Terminal Preview, WSL Bash, xterm color escape sequences, and a Windows input-method switch. Start by tracing how input-method or window changes affect the active terminal session, especially its color and zoom state. Done means switching input methods preserves the session's customized colors and zoom.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.