set t_Co=0 ignores _tcozero
neutaaaaan opened this issue · 9 comments
If TERM=vt100
, vim behaves as intended, and uses _tcozero
. The actual value of t_Co
doesn't matter.
If you manually switch from any t_Co
value to zero, everything breaks, and vim goes back to the noisy mess we were trying to avoid initially.
This feels like one of the one of those vim quirks we can't actually fix ourselves, but I don't remember having that problem before.
This feels like one of the one of those vim quirks we can't actually fix ourselves, but I don't remember having that problem before.
This is how colortemplate works. We can't define both term and cterm.
What I mean, once you have set t_Co=0
you should re-do colorscheme whatever
What I mean, once you have
set t_Co=0
you should re-docolorscheme whatever
This doesn't work with any of the colorschemes that include _tcozero
. It probably has something to do with the recent changes, because it works in a version of Iosvkem
I compiled months ago.
and you're right..
I can make it work with following steps:
- colo blue
- set t_Co=0
- syn off
- set t_Co=0
- syn on
For some reason t_Co is undefined first time I do it... not sure why
if you do vim -Nu NONE
and then
:set t_Co=0
:set t_Co?
it would echo t_Co=
if you repeat :set t_Co=0
then it would be set...
so "to make it work" one should do following:
vim -Nu NONE
:set t_Co=0
:set t_Co=0
:syn on
:colo blue
I don't know if we can capture that empty t_Co and should we do it at all provided TERM=vt100
works.
I don't know if we can capture that empty t_Co
let s:t_Co = exists('&t_Co') && &t_Co >= 0 ? (&t_Co ?? 0) : -1
works for me, but I don't know if it would be ok, and again, not sure if @lifepillar would merge another PR on this matter :)
I can't experiment on these settings right now. But if you think something should be changed in the way the color schemes are built, please go ahead and open a PR, or even only an issue!
I am open to discuss a different structure for the generated code: at this point (and long before this point), you have had much more experience than me.
I wrote in commit message: It should fix ...
And github closed this one :)