feat(highlight): add StatusLineTerm and StatusLineTermNC groups

These highlight groups are used for the statusline in :terminal windows.
By default they link to StatusLine and StatusLineNC (respectively), so
there is no visual difference unless a colorscheme defines these groups
separately.
This commit is contained in:
Gregory Anders
2024-06-11 11:10:34 -05:00
parent 7215512100
commit 3e09fbdf82
5 changed files with 40 additions and 29 deletions

View File

@@ -5107,6 +5107,11 @@ SpellRare Word that is recognized by the spellchecker as one that is
StatusLine Status line of current window. StatusLine Status line of current window.
*hl-StatusLineNC* *hl-StatusLineNC*
StatusLineNC Status lines of not-current windows. StatusLineNC Status lines of not-current windows.
*hl-StatusLineTerm*
StatusLineTerm Status line of |terminal| window.
*hl-StatusLineTermNC*
StatusLineTermNC
Status line of non-current |terminal| window.
*hl-TabLine* *hl-TabLine*
TabLine Tab pages line, not active tab page label. TabLine Tab pages line, not active tab page label.
*hl-TabLineFill* *hl-TabLineFill*

View File

@@ -78,6 +78,8 @@ EXTERN const char *hlf_names[] INIT( = {
[HLF_CU] = "Cursor", [HLF_CU] = "Cursor",
[HLF_BTITLE] = "FloatTitle", [HLF_BTITLE] = "FloatTitle",
[HLF_BFOOTER] = "FloatFooter", [HLF_BFOOTER] = "FloatFooter",
[HLF_TS] = "StatusLineTerm",
[HLF_TSNC] = "StatusLineTermNC",
}); });
EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context. EXTERN int highlight_attr[HLF_COUNT + 1]; // Highl. attr for each context.

View File

@@ -125,6 +125,8 @@ typedef enum {
HLF_CU, ///< Cursor HLF_CU, ///< Cursor
HLF_BTITLE, ///< Float Border Title HLF_BTITLE, ///< Float Border Title
HLF_BFOOTER, ///< Float Border Footer HLF_BFOOTER, ///< Float Border Footer
HLF_TS, ///< status line for terminal window
HLF_TSNC, ///< status line for non-current terminal window
HLF_COUNT, ///< MUST be the last one HLF_COUNT, ///< MUST be the last one
} hlf_T; } hlf_T;

View File

@@ -171,6 +171,8 @@ static const char *highlight_init_both[] = {
"default link PmenuKindSel PmenuSel", "default link PmenuKindSel PmenuSel",
"default link PmenuSbar Pmenu", "default link PmenuSbar Pmenu",
"default link Substitute Search", "default link Substitute Search",
"default link StatusLineTerm StatusLine",
"default link StatusLineTermNC StatusLineNC",
"default link TabLine StatusLineNC", "default link TabLine StatusLineNC",
"default link TabLineFill TabLine", "default link TabLineFill TabLine",
"default link TermCursorNC NONE", "default link TermCursorNC NONE",

View File

@@ -250,7 +250,7 @@ describe('ui/cursor', function()
m.attr = { background = Screen.colors.DarkGray } m.attr = { background = Screen.colors.DarkGray }
end end
if m.id_lm then if m.id_lm then
m.id_lm = 69 m.id_lm = 71
end end
end end