Re: [PATCH] hide OPT_MONO_* in 'M'enu when use_color=on

Urs Janßen <[email protected]> Thu, 27 Oct 2011 20:27:29 +0200
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Thu, Oct 27, 2011 at 06:55:37PM +0200, Dennis Preiser wrote:
> -		case OPT_MONO_MARKSTAR:
> -		case OPT_MONO_MARKDASH:
> -		case OPT_MONO_MARKSLASH:
> -		case OPT_MONO_MARKSTROKE:
>  		case OPT_SLASHES_REGEX:
>  		case OPT_STARS_REGEX:
>  		case OPT_STROKES_REGEX:
>  		case OPT_UNDERSCORES_REGEX:
>  			return curr_scope ? FALSE : tinrc.word_highlight;
>  
> +		case OPT_MONO_MARKSTAR:
> +		case OPT_MONO_MARKDASH:
> +		case OPT_MONO_MARKSLASH:
> +		case OPT_MONO_MARKSTROKE:
> +			return curr_scope ? FALSE : (tinrc.word_highlight && !tinrc.use_color);
> +

tinrc.use_color is only available if the system can do colors (HAVE_COLOR is
set) on other systems you end up with

./options_menu.c: In function 'option_is_visible':
./options_menu.c:231: error: 'struct t_config' has no member named
'use_color'
make: *** [options_menu.o] Error 1

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus