On Fr, 22 Apr 2016, Christian Brabandt wrote:

> Hi Bram!
> 
> On Do, 21 Apr 2016, Bram Moolenaar wrote:
> 
> > Patch 7.4.1770
> > Problem:    Cannot use true color in the terminal.
> > Solution:   Add the 'guicolors' option. (Nikolai Pavlov)
> > Files:      runtime/doc/options.txt, runtime/doc/term.txt,
> 
> > ! Sometimes setting 'guicolors' is not enough and one has to set the |t_8f| 
> > and
> > ! |t_8b| options explicitly. Default values of these options are
> > ! `^[[38;2;%lu;%lu;%lum` and `^[[48;2;%lu;%lu;%lum` (replace `^[` with real
> > ! escape) respectively, but it is only set when `$TERM` is `xterm`.
> 
> That part isn't true, is it?
> I always have to explicitly set t_8f and t_8b according to the 
> documentation. But it would be great, if it could work according to the 
> documentation.
> 
> #v+
> ~/vim/src$ TERM=xterm ./vim -u NONE -N -i NONE --cmd 'set guicolors' 
> --cmd ':set term? t_8f? t_8b?' --cmd ':q!'
>   term=xterm  t_8f=  t_8b=
> ~/vim/src$
> #v-

I think, this patch fixes it:

diff --git a/src/term.c b/src/term.c
index 059aed7..06a7d76 100644
--- a/src/term.c
+++ b/src/term.c
@@ -913,6 +913,10 @@ static struct builtin_term builtin_termcaps[] =
     {K_KENTER,         IF_EB("\033O*M", ESC_STR "O*M")},       /* keypad Enter 
*/
     {K_KPOINT,         IF_EB("\033O*n", ESC_STR "O*n")},       /* keypad . */
     {K_KDEL,           IF_EB("\033[3;*~", ESC_STR "[3;*~")},   /* keypad Del */
+# ifdef FEAT_TERMTRUECOLOR
+    {(int)KS_8F,       IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
+    {(int)KS_8B,       IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
+# endif

     {BT_EXTRA_KEYS,   ""},
     {TERMCAP2KEY('k', '0'), IF_EB("\033[10;*~", ESC_STR "[10;*~")}, /* F0 */
@@ -944,10 +948,6 @@ static struct builtin_term builtin_termcaps[] =
     {TERMCAP2KEY('F', 'Q'), IF_EB("\033[57;*~", ESC_STR "[57;*~")}, /* F36 */
     {TERMCAP2KEY('F', 'R'), IF_EB("\033[58;*~", ESC_STR "[58;*~")}, /* F37 */
 # endif
-# ifdef FEAT_TERMTRUECOLOR
-    {(int)KS_8F,       IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR 
"[38;2;%lu;%lu;%lum")},
-    {(int)KS_8B,       IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR 
"[48;2;%lu;%lu;%lum")},
-# endif

 # if defined(UNIX) || defined(ALL_BUILTIN_TCAPS)
 /*


Mit freundlichen Grüßen
Christian
-- 
Aus Fehlern lernt man.  Politiker machen keine Fehler.

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui