On 2021-12-20, wgmayer0 wrote:
> That worked - any clue why?
I don't know all the details of what Vim gets from the terminfo
database and what it sets internally, but if Vim thinks it's running
in a terminal that supports the termresponse feature (see, e.g.,
":help TermResponse"), it will send the t_RV sequence to it. That
prompts the terminal to respond with the termresponse sequence,
which describes some of the features the terminal supports,
including the number of colors.
This response comes back from the terminal sometime after vimrc is
read, if it comes back at all.
So, your vimrc sets t_Co=0. Sometime after vimrc is read, Vim sends
t_RV to the terminal. In a short time--on the order of 10s of
milliseconds, I think--the terminal responds with the number of
colors it supports and Vim sets t_Co to that value, probably 256.
Then you set t_Co=0 from the keyboard and you get your monochrome
display back.
If you set t_RV= in your vimrc, Vim sees that and doesn't send the
sequence, hence the terminal doesn't send the termresponse and your
t_Co setting is not overridden.
If you want to receive the rest of the termresponse from the
terminal, you might be able to override the t_Co setting with
something like this in your vimrc:
autocmd TermResponse * set t_Co=0
I've had mixed results with TermResponse autocommands.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211221031324.GB26168%40phoenix.