Terminal background color will frequently and partially switch colors after exiting Vim #7994

Open
opened 2026-01-31 01:18:02 +00:00 by claunia · 0 comments
Owner

Originally created by @nickjj on GitHub (May 7, 2020).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.778]
Windows Terminal version (if applicable): 0.11.1251.0

I'm using WSL 1 too.

Issue

This happens to me about 6-7 times a day while coding for a few hours and using the terminal regularly.

I'm not able to reproduce it, but I would say more often than not it happens after exiting Vim normally. That could be because Vim is one of the few dedicated terminal apps I run which is why I might be seeing it happen here most frequently.

When it bugs out, it looks like this. All I did here was exit Vim with :wq:

terminal-background-color

As you can see, hitting CTRL + C doesn't fix it, and neither does typing in normal commands.

The only way I've seen to fix it is to either resize the window or zoom in / out.

After resizing the terminal, the text that was currently in the terminal tends to get all sorts of distorted, as seen below:

terminal-background-color-after-resizing

All I did in the above screenshot was resize the terminal and then maximize it. I did not type any additional commands into the terminal. Then I have to hit CTRL + C a few times to reset the prompt where it should be.

Steps to reproduce

My best guess is to exit any type of terminal application, but I can't say for sure. It doesn't happen every time, but it happens enough (multiple times a day) where it's a problem.

It happens with different themes (I tried a few). In the screenshots I am using One Dark.

It also happens with and without using tmux.

Expected behavior

The background color of the terminal should not change.

Prior to using this terminal I've been using the wsltty terminal. With ~9 months of full time usage I've never seen anything like this happen.

Actual behavior

The terminal background gets partially changed.

Originally created by @nickjj on GitHub (May 7, 2020). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.778] Windows Terminal version (if applicable): 0.11.1251.0 ``` I'm using WSL 1 too. # Issue This happens to me about 6-7 times a day while coding for a few hours and using the terminal regularly. I'm not able to reproduce it, but I would say more often than not it happens after exiting Vim normally. That could be because Vim is one of the few dedicated terminal apps I run which is why I might be seeing it happen here most frequently. When it bugs out, it looks like this. All I did here was exit Vim with `:wq`: ![terminal-background-color](https://user-images.githubusercontent.com/813219/81299159-cb863400-9043-11ea-919c-55fb99babf50.jpg) As you can see, hitting CTRL + C doesn't fix it, and neither does typing in normal commands. The only way I've seen to fix it is to either resize the window or zoom in / out. After resizing the terminal, the text that was currently in the terminal tends to get all sorts of distorted, as seen below: ![terminal-background-color-after-resizing](https://user-images.githubusercontent.com/813219/81299346-13a55680-9044-11ea-8a47-87b23cfc7973.jpg) All I did in the above screenshot was resize the terminal and then maximize it. I did not type any additional commands into the terminal. Then I have to hit CTRL + C a few times to reset the prompt where it should be. # Steps to reproduce My best guess is to exit any type of terminal application, but I can't say for sure. It doesn't happen every time, but it happens enough (multiple times a day) where it's a problem. It happens with different themes (I tried a few). In the screenshots I am using One Dark. It also happens with and without using tmux. # Expected behavior The background color of the terminal should not change. Prior to using this terminal I've been using the wsltty terminal. With ~9 months of full time usage I've never seen anything like this happen. # Actual behavior The terminal background gets partially changed.
claunia added the Resolution-Duplicate label 2026-01-31 01:18:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#7994