Tuesday, November 5, 2013

Re: 't_Co' is always set to 256 if 'nocompatible' is set

On Monday, November 4, 2013 2:14:24 AM UTC+1, Tony Mechelynck wrote:
> However, even so, you can force Vim to ignore the t_Co value returned by
> the xterm, as follows (untested):
>
> :autocmd TermResponse * set t_Co=16
> or even
> :au TermResponse * if &term ~= '^xterm-\=16'
> \ | set t_Co=16 | endif

I now actually tried your suggestion and it didn't work. I think the
TermResponse event gets triggered before Vim interprets the response
from xterm, so the change of t_Co is overwritten later by Vim.

I also tried countless other things in my vimrc to force t_Co to 16, but
nothing worked.

Finally, I found out that xterm has an option called 'allowTcapOps'.
After setting it to false Vim is no longer able to query xterm, and t_Co
is set to the correct value now.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: