Fix active_tab_foreground ignored in slant style

Fixes #4053
This commit is contained in:
Kovid Goyal 2021-09-23 14:40:08 +05:30
parent 43c04df98a
commit f6a6ead0f3
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View file

@ -43,6 +43,10 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Allow deleting environment variables in :opt:`env` by specifying
just the variable name, without a value
- Fix :opt:`active_tab_foreground` not being honored when :opt:`tab_bar_style`
is ``slant`` (:iss:`4053`)
0.23.1 [2021-08-17]
----------------------

View file

@ -181,6 +181,7 @@ def draw_tab_with_slant(
before: int, max_title_length: int, index: int, is_last: bool,
extra_data: ExtraData
) -> int:
orig_fg = screen.cursor.fg
left_sep, right_sep = ('', '') if draw_data.tab_bar_edge == 'top' else ('', '')
tab_bg = as_rgb(color_as_int(draw_data.active_bg if tab.is_active else draw_data.inactive_bg))
slant_fg = as_rgb(color_as_int(draw_data.default_bg))
@ -190,7 +191,7 @@ def draw_sep(which: str) -> None:
screen.cursor.fg = slant_fg
screen.draw(which)
screen.cursor.bg = tab_bg
screen.cursor.fg = 0
screen.cursor.fg = orig_fg
max_title_length += 1
if max_title_length <= 1: