-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect colors in :terminal #5346
Comments
I use a test file to check that the colors are exactly the same. Most likely there is something in your setup that isn't quite right. |
Hm, perhaps the windows default terminal is buggy? There is a known problem #5092, perhaps its the same? |
Color problems have been recognized for some time and patches have been written. |
Oh, you are using an MS-Windows console to run a terminal in? Obviously this has restrictions, since a terminal window is made to run in a terminal (such as xterm), a console in MS-Windows doesn't have nearly the kind of support needed for that. The ConPTY stuff is supposed to make it work, but there are bugs... |
I was able to reproduce it. The display will be crushed. It wasn't just the color difference. |
Maybe ConPTY's device detection '^[[0c' and winpty features are mixed. "vim -u NONE -c 'set termwintype=conpty'" 's :terminal is no color, right. For now, use ConPTY's :terminal. However, not all will be solved. The line next to the ruled lines becomes trashy, which requires a retest. |
Thank you so much! I didn't know about termwintype. Thanks again! |
Thank you for your report! Now, ruled lines, the so-called ambiwidth problem. A destructive display in my environment. This does not solve cleanly. |
probably it do had a issue, i was thinking if that's a bug also, though maybe not same issue like here. |
The color is different between the newly installed Windows 10 terminal and the Windows 10 terminal updated from the previous Windows. Incredible. |
um, that issue said actually not specific to windows, but linux also, probably mac same. |
There is also such a thing. |
I read the source code. Vim script is easier to implement. Well... |
@ntak vim script sometime was not the best option either :) |
I have tuned the behavoir of the terminal window using src/testdir/color_ramp.vim. That works perfectly in an xterm now: "cat testdir/color_ramp.txt" shows the same colors at the shell prompt as inside a terminal window. Since the terminal window uses an xterm-like terminal this is possible, for Windows it will be more tricky. But we can try. |
those looks for 256 colors, but for palette - looks some term has its own setting. |
I am using @ntak's fix for now ( I can confirm that removing I'm using gvim v8.2.1127 on Windows10, with the
Is there a way where I can have both the colors I configured, and support for the <up>, <down>, <left>, <right>, <home> and <end> keys? |
Any news on this issue? |
Can I ask what happens after you exit vim, but stay in the same terminal session? Does vim then correctly restore the terminals colors to what they were previously, or do they stay different until you restart the terminal? I'm thinking it maybe similar to what i'm fixing for windows. In windows, Vim tries to get the terminals default color table (the colors mapped to the standard 16 ansi color names), and then change that table while vim is running, and then tries to restore it on exit. This fails on the new windows terminal, because windows has changed how they reports the colortable - it doesnt mean the same thing anymore as it used to in the old command prompt console. |
With |
Describe the bug
The colors used inside
:terminal
do not seem to match the colors used from a normal shell.To Reproduce
Detailed steps to reproduce the behavior:
bat
(github)bat path/to/some/code/file
inside your shell:terminal
bat path/to/some/code/file
inside your:terminal
windowExpected behavior
The two file previews should look identical
Screenshots
On the right, this is what bat shows when run from a shell and from a
:! command
:On the right, that is what bat shows when run from a vim
:terminal
:Environment (please complete the following information):
Additional context
I use bat with the
default
theme, which from their source code, should beMonokai Extended
.The text was updated successfully, but these errors were encountered: