Describe the bug
I use Vim in Windows Terminal. If termguicolors is set the acrylic opacity of WT stops working.
To Reproduce
Detailed steps to reproduce the behavior:
vim --clean:set termguicolorsExpected behavior
The WT background's opacity shouldn't be altered.
Environment (please complete the following information):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
is this windows terminal specific? Do you set the Normal highlighting group?
Yes, it is Windows Terminal specific. I have tried cmd.exe and it works.
I have it set on my vimrc and the issue persists. I only said to try vim --clean to make sure the problem is not on my vimrc
Don't you need to remove the background color for the Normal highlighting group, if you want a transparent terminal? So does that change anything?
Could you please list all commands you want me to try?
Things about this issue:
EDIT: If you mean hi Normal ctermbg=NONE command, I just tried it and the issue persists
If you are using termguicolors you also need to reset the guibg attribute.
I know I forgot to write it. The issue persists.
I think this is a duplicate of #2361 so closing.
Closed #7162.
@chrisbra yes they are rather similar.
Alas it doesn't tell how to solve the bug, the author just then said it was working fine in his system.
I tried all steps and it still doesn't work properly on my system so I think perhaps the issue shouldn't be closed.
I don't think this is a duplicate of #2361. That issue is specifically about the :terminal buffer, where vim with set termguicolors cannot clear the :terminal background. It affects vim on all operating systems, I experience it in linux, where any other window displays transparent backgrounds.
This issue is specific to the Windows OS, and affects ordinary buffers. I think it also affects cmd.exe, not just Windows Terminal. Here's a cmd.exe example:
"C:\Program Files\Vim\vim82\vim.exe" --clean -c "set tgc" -c "hi Normal guibg=white" -c "hi Normal guibg=NONE"
This opens vim to look like this:
Note that in the above example, the Normal highlight group has its guibg set to white, then reset to NONE. The background of most of the window remains white, except the text and the first line of the buffer.
Actually in my system it doesn't affect cmd.exe with transparency, it only seems to effect Windows Terminal. Weird...
I bisected and discovered that the opaquely filled background came from v8.1.2382 (commit a050b94).
However, the behavior before that was not that good thing. Next image is the result of vim.exe --clean "+set tgc" at v8.1.2381, but you can see some part of its background is still blacked.
But if I went back to v8.1.0337, such black background disappeared. Thus I think the first problem was introduced at v8.1.0338 (commit f6ceaf1).
Reopened #7162.
Oh nicely done! Hopefully there will be a way to fix it in the next releases!
If anyone want's a workaround, i created a shader to turn any wanted color transparent.
https://github.com/Hammster/windows-terminal-shaders#Transparent
Try the command autocmd vimenter * ++nested highlight normal ctermbg=none guibg=none and move it after your colorscheme declaration
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
![]()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()