From 87a8bbabcf7bb8b1c33de21df1529309697dd698 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Fri, 7 Aug 2026 15:33:14 +0300 Subject: [PATCH] fix(highlight): explicitly define `TabLineSel` bg/fg #41196 Problem: `TabLineSel` by default is defined with only bold attribute. This makes selected tabpage stand out relatively well, but when used in custom tabline it will be combined with `TabLineFill` (which is reserved for the "non tabpage" part of the tabline). Plus the behavior is not consistent with the default 'tabline' which combines it with `Normal`. Solution: Explicitly define background and foreground colors to come from `Normal` to ensure the current default 'tabline' behavior even in custom tabline. The more semantically driven solution here is to link `TabLineSel` to `StatusLine`. This makes it more aligned with how `TabLine` is linked to `StatusLineNC`. But the current "bold text with `Normal` colors" is argued to look better as a default. Also make sure that 'notermguicolors' highlighting in default and custom tablines is the same: the current tabpage does not have underline and is not bold. --- src/nvim/highlight_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index 7f1b3f8e1e..6ba8d8ae06 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -150,7 +150,7 @@ static const char *highlight_init_both[] = { "PmenuMatchSel gui=bold cterm=bold", "PmenuSel gui=reverse cterm=reverse,underline blend=0", "RedrawDebugNormal gui=reverse cterm=reverse", - "TabLineSel gui=bold cterm=NONE", + "TabLineSel guifg=fg guibg=bg gui=bold cterm=nocombine", "TermCursor gui=reverse cterm=reverse", "Underlined gui=underline cterm=underline", "lCursor guifg=bg guibg=fg",