Mercurial > vim
diff src/syntax.c @ 12122:68c593f649d1 v8.0.0941
patch 8.0.0941: existing color schemes don't like StatusLineTerm
commit https://github.com/vim/vim/commit/05fbfdcda48a564e7a778c67251f732481f3ceaa
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 14 22:35:08 2017 +0200
patch 8.0.0941: existing color schemes don't like StatusLineTerm
Problem: Existing color schemes don't work well with StatusLineTerm.
Solution: Don't use "reverse", use fg and bg colors. Also add
StatusLineTermNC.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 14 Aug 2017 22:45:04 +0200 |
parents | f306e6decaf9 |
children | 88ca0110abd5 |
line wrap: on
line diff
--- a/src/syntax.c +++ b/src/syntax.c @@ -6873,230 +6873,237 @@ syntime_report(void) #else # define CENT(a, b) a #endif -static char *(highlight_init_both[]) = - { - CENT("ErrorMsg term=standout ctermbg=DarkRed ctermfg=White", - "ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White"), - CENT("IncSearch term=reverse cterm=reverse", - "IncSearch term=reverse cterm=reverse gui=reverse"), - CENT("ModeMsg term=bold cterm=bold", - "ModeMsg term=bold cterm=bold gui=bold"), - CENT("NonText term=bold ctermfg=Blue", - "NonText term=bold ctermfg=Blue gui=bold guifg=Blue"), - CENT("StatusLine term=reverse,bold cterm=reverse,bold", - "StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold"), - CENT("StatusLineNC term=reverse cterm=reverse", - "StatusLineNC term=reverse cterm=reverse gui=reverse"), -#ifdef FEAT_TERMINAL - CENT("StatusLineTerm term=reverse cterm=reverse ctermFg=DarkGreen", - "StatusLineTerm term=reverse cterm=reverse ctermFg=DarkGreen gui=reverse guifg=DarkGreen"), -#endif - "default link EndOfBuffer NonText", +static char *(highlight_init_both[]) = { + CENT("ErrorMsg term=standout ctermbg=DarkRed ctermfg=White", + "ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=Red guifg=White"), + CENT("IncSearch term=reverse cterm=reverse", + "IncSearch term=reverse cterm=reverse gui=reverse"), + CENT("ModeMsg term=bold cterm=bold", + "ModeMsg term=bold cterm=bold gui=bold"), + CENT("NonText term=bold ctermfg=Blue", + "NonText term=bold ctermfg=Blue gui=bold guifg=Blue"), + CENT("StatusLine term=reverse,bold cterm=reverse,bold", + "StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold"), + CENT("StatusLineNC term=reverse cterm=reverse", + "StatusLineNC term=reverse cterm=reverse gui=reverse"), + "default link EndOfBuffer NonText", #ifdef FEAT_WINDOWS - CENT("VertSplit term=reverse cterm=reverse", - "VertSplit term=reverse cterm=reverse gui=reverse"), + CENT("VertSplit term=reverse cterm=reverse", + "VertSplit term=reverse cterm=reverse gui=reverse"), #endif #ifdef FEAT_CLIPBOARD - CENT("VisualNOS term=underline,bold cterm=underline,bold", - "VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold"), + CENT("VisualNOS term=underline,bold cterm=underline,bold", + "VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold"), #endif #ifdef FEAT_DIFF - CENT("DiffText term=reverse cterm=bold ctermbg=Red", - "DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red"), + CENT("DiffText term=reverse cterm=bold ctermbg=Red", + "DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=Red"), #endif #ifdef FEAT_INS_EXPAND - CENT("PmenuSbar ctermbg=Grey", - "PmenuSbar ctermbg=Grey guibg=Grey"), + CENT("PmenuSbar ctermbg=Grey", + "PmenuSbar ctermbg=Grey guibg=Grey"), #endif #ifdef FEAT_WINDOWS - CENT("TabLineSel term=bold cterm=bold", - "TabLineSel term=bold cterm=bold gui=bold"), - CENT("TabLineFill term=reverse cterm=reverse", - "TabLineFill term=reverse cterm=reverse gui=reverse"), + CENT("TabLineSel term=bold cterm=bold", + "TabLineSel term=bold cterm=bold gui=bold"), + CENT("TabLineFill term=reverse cterm=reverse", + "TabLineFill term=reverse cterm=reverse gui=reverse"), #endif #ifdef FEAT_GUI - "Cursor guibg=fg guifg=bg", - "lCursor guibg=fg guifg=bg", /* should be different, but what? */ -#endif - "default link QuickFixLine Search", - NULL - }; - -static char *(highlight_init_light[]) = - { - CENT("Directory term=bold ctermfg=DarkBlue", - "Directory term=bold ctermfg=DarkBlue guifg=Blue"), - CENT("LineNr term=underline ctermfg=Brown", - "LineNr term=underline ctermfg=Brown guifg=Brown"), - CENT("CursorLineNr term=bold ctermfg=Brown", - "CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"), - CENT("MoreMsg term=bold ctermfg=DarkGreen", - "MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"), - CENT("Question term=standout ctermfg=DarkGreen", - "Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen"), - CENT("Search term=reverse ctermbg=Yellow ctermfg=NONE", - "Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE"), + "Cursor guibg=fg guifg=bg", + "lCursor guibg=fg guifg=bg", /* should be different, but what? */ +#endif + "default link QuickFixLine Search", + NULL +}; + +/* Default colors only used with a light background. */ +static char *(highlight_init_light[]) = { + CENT("Directory term=bold ctermfg=DarkBlue", + "Directory term=bold ctermfg=DarkBlue guifg=Blue"), + CENT("LineNr term=underline ctermfg=Brown", + "LineNr term=underline ctermfg=Brown guifg=Brown"), + CENT("CursorLineNr term=bold ctermfg=Brown", + "CursorLineNr term=bold ctermfg=Brown gui=bold guifg=Brown"), + CENT("MoreMsg term=bold ctermfg=DarkGreen", + "MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=SeaGreen"), + CENT("Question term=standout ctermfg=DarkGreen", + "Question term=standout ctermfg=DarkGreen gui=bold guifg=SeaGreen"), + CENT("Search term=reverse ctermbg=Yellow ctermfg=NONE", + "Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=Yellow guifg=NONE"), #ifdef FEAT_SPELL - CENT("SpellBad term=reverse ctermbg=LightRed", - "SpellBad term=reverse ctermbg=LightRed guisp=Red gui=undercurl"), - CENT("SpellCap term=reverse ctermbg=LightBlue", - "SpellCap term=reverse ctermbg=LightBlue guisp=Blue gui=undercurl"), - CENT("SpellRare term=reverse ctermbg=LightMagenta", - "SpellRare term=reverse ctermbg=LightMagenta guisp=Magenta gui=undercurl"), - CENT("SpellLocal term=underline ctermbg=Cyan", - "SpellLocal term=underline ctermbg=Cyan guisp=DarkCyan gui=undercurl"), + CENT("SpellBad term=reverse ctermbg=LightRed", + "SpellBad term=reverse ctermbg=LightRed guisp=Red gui=undercurl"), + CENT("SpellCap term=reverse ctermbg=LightBlue", + "SpellCap term=reverse ctermbg=LightBlue guisp=Blue gui=undercurl"), + CENT("SpellRare term=reverse ctermbg=LightMagenta", + "SpellRare term=reverse ctermbg=LightMagenta guisp=Magenta gui=undercurl"), + CENT("SpellLocal term=underline ctermbg=Cyan", + "SpellLocal term=underline ctermbg=Cyan guisp=DarkCyan gui=undercurl"), #endif #ifdef FEAT_INS_EXPAND - CENT("PmenuThumb ctermbg=Black", - "PmenuThumb ctermbg=Black guibg=Black"), - CENT("Pmenu ctermbg=LightMagenta ctermfg=Black", - "Pmenu ctermbg=LightMagenta ctermfg=Black guibg=LightMagenta"), - CENT("PmenuSel ctermbg=LightGrey ctermfg=Black", - "PmenuSel ctermbg=LightGrey ctermfg=Black guibg=Grey"), -#endif - CENT("SpecialKey term=bold ctermfg=DarkBlue", - "SpecialKey term=bold ctermfg=DarkBlue guifg=Blue"), - CENT("Title term=bold ctermfg=DarkMagenta", - "Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta"), - CENT("WarningMsg term=standout ctermfg=DarkRed", - "WarningMsg term=standout ctermfg=DarkRed guifg=Red"), + CENT("PmenuThumb ctermbg=Black", + "PmenuThumb ctermbg=Black guibg=Black"), + CENT("Pmenu ctermbg=LightMagenta ctermfg=Black", + "Pmenu ctermbg=LightMagenta ctermfg=Black guibg=LightMagenta"), + CENT("PmenuSel ctermbg=LightGrey ctermfg=Black", + "PmenuSel ctermbg=LightGrey ctermfg=Black guibg=Grey"), +#endif + CENT("SpecialKey term=bold ctermfg=DarkBlue", + "SpecialKey term=bold ctermfg=DarkBlue guifg=Blue"), + CENT("Title term=bold ctermfg=DarkMagenta", + "Title term=bold ctermfg=DarkMagenta gui=bold guifg=Magenta"), + CENT("WarningMsg term=standout ctermfg=DarkRed", + "WarningMsg term=standout ctermfg=DarkRed guifg=Red"), #ifdef FEAT_WILDMENU - CENT("WildMenu term=standout ctermbg=Yellow ctermfg=Black", - "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), + CENT("WildMenu term=standout ctermbg=Yellow ctermfg=Black", + "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), #endif #ifdef FEAT_FOLDING - CENT("Folded term=standout ctermbg=Grey ctermfg=DarkBlue", - "Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue"), - CENT("FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue", - "FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"), + CENT("Folded term=standout ctermbg=Grey ctermfg=DarkBlue", + "Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=LightGrey guifg=DarkBlue"), + CENT("FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue", + "FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"), #endif #ifdef FEAT_SIGNS - CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue", - "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"), -#endif - CENT("Visual term=reverse", - "Visual term=reverse guibg=LightGrey"), + CENT("SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue", + "SignColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=Grey guifg=DarkBlue"), +#endif + CENT("Visual term=reverse", + "Visual term=reverse guibg=LightGrey"), #ifdef FEAT_DIFF - CENT("DiffAdd term=bold ctermbg=LightBlue", - "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"), - CENT("DiffChange term=bold ctermbg=LightMagenta", - "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta"), - CENT("DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan", - "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan"), + CENT("DiffAdd term=bold ctermbg=LightBlue", + "DiffAdd term=bold ctermbg=LightBlue guibg=LightBlue"), + CENT("DiffChange term=bold ctermbg=LightMagenta", + "DiffChange term=bold ctermbg=LightMagenta guibg=LightMagenta"), + CENT("DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan", + "DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=Blue guibg=LightCyan"), #endif #ifdef FEAT_WINDOWS - CENT("TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey", - "TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey"), + CENT("TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey", + "TabLine term=underline cterm=underline ctermfg=black ctermbg=LightGrey gui=underline guibg=LightGrey"), #endif #ifdef FEAT_SYN_HL - CENT("CursorColumn term=reverse ctermbg=LightGrey", - "CursorColumn term=reverse ctermbg=LightGrey guibg=Grey90"), - CENT("CursorLine term=underline cterm=underline", - "CursorLine term=underline cterm=underline guibg=Grey90"), - CENT("ColorColumn term=reverse ctermbg=LightRed", - "ColorColumn term=reverse ctermbg=LightRed guibg=LightRed"), + CENT("CursorColumn term=reverse ctermbg=LightGrey", + "CursorColumn term=reverse ctermbg=LightGrey guibg=Grey90"), + CENT("CursorLine term=underline cterm=underline", + "CursorLine term=underline cterm=underline guibg=Grey90"), + CENT("ColorColumn term=reverse ctermbg=LightRed", + "ColorColumn term=reverse ctermbg=LightRed guibg=LightRed"), #endif #ifdef FEAT_CONCEAL - CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey", - "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"), + CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey", + "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"), #endif #ifdef FEAT_AUTOCMD - CENT("MatchParen term=reverse ctermbg=Cyan", - "MatchParen term=reverse ctermbg=Cyan guibg=Cyan"), + CENT("MatchParen term=reverse ctermbg=Cyan", + "MatchParen term=reverse ctermbg=Cyan guibg=Cyan"), #endif #ifdef FEAT_GUI - "Normal gui=NONE", -#endif - NULL - }; - -static char *(highlight_init_dark[]) = - { - CENT("Directory term=bold ctermfg=LightCyan", - "Directory term=bold ctermfg=LightCyan guifg=Cyan"), - CENT("LineNr term=underline ctermfg=Yellow", - "LineNr term=underline ctermfg=Yellow guifg=Yellow"), - CENT("CursorLineNr term=bold ctermfg=Yellow", - "CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"), - CENT("MoreMsg term=bold ctermfg=LightGreen", - "MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"), - CENT("Question term=standout ctermfg=LightGreen", - "Question term=standout ctermfg=LightGreen gui=bold guifg=Green"), - CENT("Search term=reverse ctermbg=Yellow ctermfg=Black", - "Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), - CENT("SpecialKey term=bold ctermfg=LightBlue", - "SpecialKey term=bold ctermfg=LightBlue guifg=Cyan"), + "Normal gui=NONE", +#endif +#ifdef FEAT_TERMINAL + CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen", + "StatusLineTerm term=reverse,bold cterm=bold ctermfg=White ctermbg=DarkGreen gui=bold guifg=bg guibg=DarkGreen"), + CENT("StatusLineTermNC term=reverse ctermfg=White ctermbg=DarkGreen", + "StatusLineTermNC term=reverse ctermfg=White ctermbg=DarkGreen guifg=bg guibg=DarkGreen"), +#endif + NULL +}; + +/* Default colors only used with a dark background. */ +static char *(highlight_init_dark[]) = { + CENT("Directory term=bold ctermfg=LightCyan", + "Directory term=bold ctermfg=LightCyan guifg=Cyan"), + CENT("LineNr term=underline ctermfg=Yellow", + "LineNr term=underline ctermfg=Yellow guifg=Yellow"), + CENT("CursorLineNr term=bold ctermfg=Yellow", + "CursorLineNr term=bold ctermfg=Yellow gui=bold guifg=Yellow"), + CENT("MoreMsg term=bold ctermfg=LightGreen", + "MoreMsg term=bold ctermfg=LightGreen gui=bold guifg=SeaGreen"), + CENT("Question term=standout ctermfg=LightGreen", + "Question term=standout ctermfg=LightGreen gui=bold guifg=Green"), + CENT("Search term=reverse ctermbg=Yellow ctermfg=Black", + "Search term=reverse ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), + CENT("SpecialKey term=bold ctermfg=LightBlue", + "SpecialKey term=bold ctermfg=LightBlue guifg=Cyan"), #ifdef FEAT_SPELL - CENT("SpellBad term=reverse ctermbg=Red", - "SpellBad term=reverse ctermbg=Red guisp=Red gui=undercurl"), - CENT("SpellCap term=reverse ctermbg=Blue", - "SpellCap term=reverse ctermbg=Blue guisp=Blue gui=undercurl"), - CENT("SpellRare term=reverse ctermbg=Magenta", - "SpellRare term=reverse ctermbg=Magenta guisp=Magenta gui=undercurl"), - CENT("SpellLocal term=underline ctermbg=Cyan", - "SpellLocal term=underline ctermbg=Cyan guisp=Cyan gui=undercurl"), + CENT("SpellBad term=reverse ctermbg=Red", + "SpellBad term=reverse ctermbg=Red guisp=Red gui=undercurl"), + CENT("SpellCap term=reverse ctermbg=Blue", + "SpellCap term=reverse ctermbg=Blue guisp=Blue gui=undercurl"), + CENT("SpellRare term=reverse ctermbg=Magenta", + "SpellRare term=reverse ctermbg=Magenta guisp=Magenta gui=undercurl"), + CENT("SpellLocal term=underline ctermbg=Cyan", + "SpellLocal term=underline ctermbg=Cyan guisp=Cyan gui=undercurl"), #endif #ifdef FEAT_INS_EXPAND - CENT("PmenuThumb ctermbg=White", - "PmenuThumb ctermbg=White guibg=White"), - CENT("Pmenu ctermbg=Magenta ctermfg=Black", - "Pmenu ctermbg=Magenta ctermfg=Black guibg=Magenta"), - CENT("PmenuSel ctermbg=Black ctermfg=DarkGrey", - "PmenuSel ctermbg=Black ctermfg=DarkGrey guibg=DarkGrey"), -#endif - CENT("Title term=bold ctermfg=LightMagenta", - "Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta"), - CENT("WarningMsg term=standout ctermfg=LightRed", - "WarningMsg term=standout ctermfg=LightRed guifg=Red"), + CENT("PmenuThumb ctermbg=White", + "PmenuThumb ctermbg=White guibg=White"), + CENT("Pmenu ctermbg=Magenta ctermfg=Black", + "Pmenu ctermbg=Magenta ctermfg=Black guibg=Magenta"), + CENT("PmenuSel ctermbg=Black ctermfg=DarkGrey", + "PmenuSel ctermbg=Black ctermfg=DarkGrey guibg=DarkGrey"), +#endif + CENT("Title term=bold ctermfg=LightMagenta", + "Title term=bold ctermfg=LightMagenta gui=bold guifg=Magenta"), + CENT("WarningMsg term=standout ctermfg=LightRed", + "WarningMsg term=standout ctermfg=LightRed guifg=Red"), #ifdef FEAT_WILDMENU - CENT("WildMenu term=standout ctermbg=Yellow ctermfg=Black", - "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), + CENT("WildMenu term=standout ctermbg=Yellow ctermfg=Black", + "WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=Yellow guifg=Black"), #endif #ifdef FEAT_FOLDING - CENT("Folded term=standout ctermbg=DarkGrey ctermfg=Cyan", - "Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan"), - CENT("FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan", - "FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"), + CENT("Folded term=standout ctermbg=DarkGrey ctermfg=Cyan", + "Folded term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=DarkGrey guifg=Cyan"), + CENT("FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan", + "FoldColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"), #endif #ifdef FEAT_SIGNS - CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan", - "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"), -#endif - CENT("Visual term=reverse", - "Visual term=reverse guibg=DarkGrey"), + CENT("SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan", + "SignColumn term=standout ctermbg=DarkGrey ctermfg=Cyan guibg=Grey guifg=Cyan"), +#endif + CENT("Visual term=reverse", + "Visual term=reverse guibg=DarkGrey"), #ifdef FEAT_DIFF - CENT("DiffAdd term=bold ctermbg=DarkBlue", - "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"), - CENT("DiffChange term=bold ctermbg=DarkMagenta", - "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta"), - CENT("DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan", - "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan"), + CENT("DiffAdd term=bold ctermbg=DarkBlue", + "DiffAdd term=bold ctermbg=DarkBlue guibg=DarkBlue"), + CENT("DiffChange term=bold ctermbg=DarkMagenta", + "DiffChange term=bold ctermbg=DarkMagenta guibg=DarkMagenta"), + CENT("DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan", + "DiffDelete term=bold ctermfg=Blue ctermbg=DarkCyan gui=bold guifg=Blue guibg=DarkCyan"), #endif #ifdef FEAT_WINDOWS - CENT("TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey", - "TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey"), + CENT("TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey", + "TabLine term=underline cterm=underline ctermfg=white ctermbg=DarkGrey gui=underline guibg=DarkGrey"), #endif #ifdef FEAT_SYN_HL - CENT("CursorColumn term=reverse ctermbg=DarkGrey", - "CursorColumn term=reverse ctermbg=DarkGrey guibg=Grey40"), - CENT("CursorLine term=underline cterm=underline", - "CursorLine term=underline cterm=underline guibg=Grey40"), - CENT("ColorColumn term=reverse ctermbg=DarkRed", - "ColorColumn term=reverse ctermbg=DarkRed guibg=DarkRed"), + CENT("CursorColumn term=reverse ctermbg=DarkGrey", + "CursorColumn term=reverse ctermbg=DarkGrey guibg=Grey40"), + CENT("CursorLine term=underline cterm=underline", + "CursorLine term=underline cterm=underline guibg=Grey40"), + CENT("ColorColumn term=reverse ctermbg=DarkRed", + "ColorColumn term=reverse ctermbg=DarkRed guibg=DarkRed"), #endif #ifdef FEAT_AUTOCMD - CENT("MatchParen term=reverse ctermbg=DarkCyan", - "MatchParen term=reverse ctermbg=DarkCyan guibg=DarkCyan"), + CENT("MatchParen term=reverse ctermbg=DarkCyan", + "MatchParen term=reverse ctermbg=DarkCyan guibg=DarkCyan"), #endif #ifdef FEAT_CONCEAL - CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey", - "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"), + CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey", + "Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"), #endif #ifdef FEAT_GUI - "Normal gui=NONE", -#endif - NULL - }; + "Normal gui=NONE", +#endif +#ifdef FEAT_TERMINAL + CENT("StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen", + "StatusLineTerm term=reverse,bold cterm=bold ctermfg=Black ctermbg=LightGreen gui=bold guifg=bg guibg=LightGreen"), + CENT("StatusLineTermNC term=reverse ctermfg=Black ctermbg=LightGreen", + "StatusLineTermNC term=reverse ctermfg=Black ctermbg=LightGreen guifg=bg guibg=LightGreen"), +#endif + NULL +}; void init_highlight( @@ -9788,7 +9795,7 @@ gui_do_one_color( #if defined(USER_HIGHLIGHT) && defined(FEAT_STL_OPT) /* - * Apply difference between User[1-9] and HLF_S to HLF_SNC or HLF_ST. + * Apply difference between User[1-9] and HLF_S to HLF_SNC, HLF_ST or HLF_STNC. */ static void combine_stl_hlt( @@ -9877,6 +9884,7 @@ highlight_changed(void) int id_S = -1; # ifdef FEAT_TERMINAL int id_ST = -1; + int id_STNC = -1; # endif int hlcnt; # endif @@ -9960,6 +9968,8 @@ highlight_changed(void) # ifdef FEAT_TERMINAL else if (hlf == (int)HLF_ST) id_ST = syn_get_final_id(id); + else if (hlf == (int)HLF_STNC) + id_STNC = syn_get_final_id(id); # endif else if (hlf == (int)HLF_S) id_S = syn_get_final_id(id); @@ -9977,22 +9987,23 @@ highlight_changed(void) #ifdef USER_HIGHLIGHT /* Setup the user highlights * - * Temporarily utilize 19 more hl entries: + * Temporarily utilize 28 more hl entries: * 9 for User1-User9 combined with StatusLineNC * 9 for User1-User9 combined with StatusLineTerm + * 9 for User1-User9 combined with StatusLineTermNC * 1 for StatusLine default * Have to be in there simultaneously in case of table overflows in * get_attr_entry() */ # ifdef FEAT_STL_OPT - if (ga_grow(&highlight_ga, 19) == FAIL) + if (ga_grow(&highlight_ga, 28) == FAIL) return FAIL; hlcnt = highlight_ga.ga_len; if (id_S == 0) { /* Make sure id_S is always valid to simplify code below. Use the last * entry. */ - vim_memset(&HL_TABLE()[hlcnt + 18], 0, sizeof(struct hl_group)); + vim_memset(&HL_TABLE()[hlcnt + 27], 0, sizeof(struct hl_group)); HL_TABLE()[hlcnt + 18].sg_term = highlight_attr[HLF_S]; id_S = hlcnt + 19; } @@ -10008,6 +10019,7 @@ highlight_changed(void) highlight_stlnc[i] = 0; # ifdef FEAT_TERMINAL highlight_stlterm[i] = 0; + highlight_stltermnc[i] = 0; # endif # endif } @@ -10020,6 +10032,8 @@ highlight_changed(void) # ifdef FEAT_TERMINAL combine_stl_hlt(id, id_S, id_ST, hlcnt + 9, i, HLF_ST, highlight_stlterm); + combine_stl_hlt(id, id_S, id_STNC, hlcnt + 18, i, + HLF_STNC, highlight_stltermnc); # endif # endif }