-
-
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
TERM=linux : wrong t_Co during startup #5538
Comments
That's a colorscheme bug. Most likely a misplaced |
Not even the default colorscheme does load correctly, when starting neovim. |
Can you reproduce this with |
Yes, the default colorscheme does not load properly when I invoke neovim using nvim -u NONE +'syntax on'. And yes it seems to happen in the framebuffer console only. |
Does the same happen with Vim? |
How would one reproduce this in a VM? With TERM=linux things work fine for me. Maybe a terminfo issue? |
Vim does not have this problem. |
I can confirm that the nvim wildmenu uses black text for the selected entry on both tty and when started with |
fab6214 explains what's going on here: "mis-reporting 't_Co' during startup" is why colorscheme is wrong before startup. Fixing this might be a bit fiddly but it should be straightforward, if anyone wants to spend the time. Help would be welcome. |
I just stumbled across this issue and think I may be experiencing the same problem. I have a colorscheme written for GUI and 256 color terminals. It does NOT support 8/16 color terminals. In vim, this is simple: if &t_Co < 256 && !has("gui_running")
set bg=dark
colorscheme default
else
colorscheme xoria256
endif NeoVim always concludes that we have 256 colors and/or GUI, even if we don't. There is simply no way to test for an 8 or 16 color terminal in NeoVim, nor to tell NeoVim not to replace (mostly) functional highlighting (default visual-mode selections can/do result in light gray on light gray unreadable text) with less highlighting than the average 1970s teletype. Perhaps its a documentation issue if how this is done has changed, or a feature regression from standard vim. I'm not even sure it's the issue you're seeing here, but I'll bet it's related. (Interestingly enough, the xoria256 theme looks great under tmux on the Linux terminal. If it did that without tmux running, I wouldn't be using the above block. I would still want to detect the low-color case to change a few defaults, though.) |
... Yup, it's related. And I can see how fixing it will be not trivial. Fortunately there are workarounds for the time being. |
#6673 should fix this for linux 4.8, if not older. |
I waited for Debian to update as their version was rather old even in sid due to the way their release cycle works. Currently it has 0.2.0, and I find that the Linux console remains monochrome. My init.vim now always uses a 256 color theme because neovim ripped out the ability to detect when your terminal didn't support that. If I run tmux at the console, I get 16 color approximations, but with the plain console and TERM=linux, if you use any but the base 16 VGA colors, you get nothing but silent failure. Still running Linux 4.9 here, but this is supposed to work with 4.8. Unless I'm missing something, this bug appears to still exist. Obviously the Linux framebuffer console has only 8 or 16 VGA colors. Alas kmscon is dead and fbterm was more hassle than it was worth. This was fine--you just couldn't have a fancy high-color theme in vim. But now you cannot detect that you need a low color theme, and high color themes simply don't work. |
Nvim did not rip out the ability to check |
Resolution/Summary
Generally, Nvim startup is not blocked on waiting for the UI, including the TUI. So depending on a particular value of Locked to keep the summary visible. You can always chat or open a ticket if you have new information/topics to discuss. |
nvim --version
: v0.1.6-309-g90bf31c$TERM
: linuxBehaviour
Colorscheme does not load correctly in framebuffer console (eg. the wildmenu is black on black).
After reloading default colorscheme manually, colors seem to be "normal".
Steps to reproduce using
nvim -u NORC
nvim -u NORC
The text was updated successfully, but these errors were encountered: