comparison src/screen.c @ 9027:773d627cac0b v7.4.1799

commit https://github.com/vim/vim/commit/61be73bb0f965a895bfb064ea3e55476ac175162 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 29 22:59:22 2016 +0200 patch 7.4.1799 Problem: 'guicolors' is a confusing option name. Solution: Use 'termguicolors' instead. (Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Apr 2016 23:00:07 +0200
parents b3da1ec8d156
children ddccff0480d2
comparison
equal deleted inserted replaced
9026:eea316a77946 9027:773d627cac0b
7838 attr = aep->ae_attr; 7838 attr = aep->ae_attr;
7839 } 7839 }
7840 if ((attr & HL_BOLD) && T_MD != NULL) /* bold */ 7840 if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
7841 out_str(T_MD); 7841 out_str(T_MD);
7842 else if (aep != NULL && cterm_normal_fg_bold && 7842 else if (aep != NULL && cterm_normal_fg_bold &&
7843 #ifdef FEAT_TERMTRUECOLOR 7843 #ifdef FEAT_TERMGUICOLORS
7844 (p_guicolors ? 7844 (p_tgc ?
7845 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR): 7845 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR):
7846 #endif 7846 #endif
7847 (t_colors > 1 && aep->ae_u.cterm.fg_color) 7847 (t_colors > 1 && aep->ae_u.cterm.fg_color)
7848 #ifdef FEAT_TERMTRUECOLOR 7848 #ifdef FEAT_TERMGUICOLORS
7849 ) 7849 )
7850 #endif 7850 #endif
7851 ) 7851 )
7852 /* If the Normal FG color has BOLD attribute and the new HL 7852 /* If the Normal FG color has BOLD attribute and the new HL
7853 * has a FG color defined, clear BOLD. */ 7853 * has a FG color defined, clear BOLD. */
7866 * Output the color or start string after bold etc., in case the 7866 * Output the color or start string after bold etc., in case the
7867 * bold etc. override the color setting. 7867 * bold etc. override the color setting.
7868 */ 7868 */
7869 if (aep != NULL) 7869 if (aep != NULL)
7870 { 7870 {
7871 #ifdef FEAT_TERMTRUECOLOR 7871 #ifdef FEAT_TERMGUICOLORS
7872 if (p_guicolors) 7872 if (p_tgc)
7873 { 7873 {
7874 if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR) 7874 if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
7875 term_fg_rgb_color(aep->ae_u.cterm.fg_rgb); 7875 term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
7876 if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR) 7876 if (aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
7877 term_bg_rgb_color(aep->ae_u.cterm.bg_rgb); 7877 term_bg_rgb_color(aep->ae_u.cterm.bg_rgb);
7929 /* 7929 /*
7930 * Assume that t_me restores the original colors! 7930 * Assume that t_me restores the original colors!
7931 */ 7931 */
7932 aep = syn_cterm_attr2entry(screen_attr); 7932 aep = syn_cterm_attr2entry(screen_attr);
7933 if (aep != NULL && 7933 if (aep != NULL &&
7934 #ifdef FEAT_TERMTRUECOLOR 7934 #ifdef FEAT_TERMGUICOLORS
7935 (p_guicolors ? 7935 (p_tgc ?
7936 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR || 7936 (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR ||
7937 aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR): 7937 aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR):
7938 #endif 7938 #endif
7939 (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color) 7939 (aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
7940 #ifdef FEAT_TERMTRUECOLOR 7940 #ifdef FEAT_TERMGUICOLORS
7941 ) 7941 )
7942 #endif 7942 #endif
7943 ) 7943 )
7944 do_ME = TRUE; 7944 do_ME = TRUE;
7945 } 7945 }
7986 out_str(T_CZR); 7986 out_str(T_CZR);
7987 } 7987 }
7988 if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE))) 7988 if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE)))
7989 out_str(T_ME); 7989 out_str(T_ME);
7990 7990
7991 #ifdef FEAT_TERMTRUECOLOR 7991 #ifdef FEAT_TERMGUICOLORS
7992 if (p_guicolors) 7992 if (p_tgc)
7993 { 7993 {
7994 if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR) 7994 if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
7995 term_fg_rgb_color(cterm_normal_fg_gui_color); 7995 term_fg_rgb_color(cterm_normal_fg_gui_color);
7996 if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR) 7996 if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
7997 term_bg_rgb_color(cterm_normal_bg_gui_color); 7997 term_bg_rgb_color(cterm_normal_bg_gui_color);
8023 reset_cterm_colors(void) 8023 reset_cterm_colors(void)
8024 { 8024 {
8025 if (IS_CTERM) 8025 if (IS_CTERM)
8026 { 8026 {
8027 /* set Normal cterm colors */ 8027 /* set Normal cterm colors */
8028 #ifdef FEAT_TERMTRUECOLOR 8028 #ifdef FEAT_TERMGUICOLORS
8029 if (p_guicolors ? 8029 if (p_tgc ?
8030 (cterm_normal_fg_gui_color != (long_u)INVALCOLOR 8030 (cterm_normal_fg_gui_color != (long_u)INVALCOLOR
8031 || cterm_normal_bg_gui_color != (long_u)INVALCOLOR): 8031 || cterm_normal_bg_gui_color != (long_u)INVALCOLOR):
8032 (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)) 8032 (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
8033 #else 8033 #else
8034 if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0) 8034 if (cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0)
8957 { 8957 {
8958 return (*p != NUL && (t_colors <= 1 8958 return (*p != NUL && (t_colors <= 1
8959 #ifdef FEAT_GUI 8959 #ifdef FEAT_GUI
8960 || gui.in_use 8960 || gui.in_use
8961 #endif 8961 #endif
8962 #ifdef FEAT_TERMTRUECOLOR 8962 #ifdef FEAT_TERMGUICOLORS
8963 || (p_guicolors && cterm_normal_bg_gui_color != (long_u)INVALCOLOR) 8963 || (p_tgc && cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
8964 #endif 8964 #endif
8965 || cterm_normal_bg_color == 0 || *T_UT != NUL)); 8965 || cterm_normal_bg_color == 0 || *T_UT != NUL));
8966 } 8966 }
8967 8967
8968 /* 8968 /*
10291 int room; 10291 int room;
10292 int use_sep_chars = (t_colors < 8 10292 int use_sep_chars = (t_colors < 8
10293 #ifdef FEAT_GUI 10293 #ifdef FEAT_GUI
10294 && !gui.in_use 10294 && !gui.in_use
10295 #endif 10295 #endif
10296 #ifdef FEAT_TERMTRUECOLOR 10296 #ifdef FEAT_TERMGUICOLORS
10297 && !p_guicolors 10297 && !p_tgc
10298 #endif 10298 #endif
10299 ); 10299 );
10300 10300
10301 redraw_tabline = FALSE; 10301 redraw_tabline = FALSE;
10302 10302