Nazri Ramliy wrote:

> On Thu, Jan 3, 2019 at 12:28 AM Bram Moolenaar <[email protected]> wrote:
> >
> > + #ifdef FEAT_SYN_HL
> > +     int               use_highlight = (items == (char_u **)features);
> > + #endif
> 
> Perhaps this is better?:
> 
> -    int                use_highlight = (items == (char_u **)features);
> +    int                use_highlight = (items == (char_u **)features) &&
> +                                get_var_value((char_u *)"g:syntax_on") != 
> NULL;
> 
> That way the user can at least have a way of disabling the higlighting
> if necessary, for example in the case where somehow their terminal
> background color happens to match the color of HL_ATTR(HLF_W) which
> would make the disabled features invisible. Also some people prefer not
> to have colors at all in their terminal so this should also cater to
> them.

Informational messages are not really related to syntax highlighting.
It is unexpected that the :version output changes depending on what file
you are editing (which might enable/disable syntax depending on the file
type).  I can't think of another existing flag to use for this, and
adding a new flag doesn't appear to be worth it.

The color used is for warning messages, thus it can be expected to be
visible.

We'll see if someone has a problem with this, I think your idea is
useful.

-- 
>From "know your smileys":
 :-| :-|   Deja' vu!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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