From f6a6ead0f31143f62d76534451c96206f0d8aac9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Sep 2021 14:40:08 +0530 Subject: [PATCH] Fix active_tab_foreground ignored in slant style Fixes #4053 --- docs/changelog.rst | 4 ++++ kitty/tab_bar.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e56dcbb06..d969787f6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -43,6 +43,10 @@ To update |kitty|, :doc:`follow the instructions `. - 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] ---------------------- diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index a6b7e28df..fbde31651 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -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_tab_with_slant( 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: