From 162e4983476514f1afc2aae1a8593a4fde0a7c5e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 26 Apr 2021 20:18:50 +0530 Subject: [PATCH] Fix @ set-colors for active_tab_foreground --- docs/changelog.rst | 2 ++ kitty/tab_bar.py | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0179c74c5..094b1164d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -41,6 +41,8 @@ To update |kitty|, :doc:`follow the instructions `. - Special case rendering of the few remaining Powerline box drawing chars (:iss:`3535`) +- Fix ``kitty @ set-colors`` not working for the :opt:`active_tab_foreground`. + 0.20.1 [2021-04-19] ---------------------- diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 50b847169..a4cb98414 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -295,6 +295,7 @@ class TabBar: def patch_colors(self, spec: Dict[str, Any]) -> None: if 'active_tab_foreground' in spec: self.active_fg = (spec['active_tab_foreground'] << 8) | 2 + self.draw_data = self.draw_data._replace(active_fg=color_from_int(spec['active_tab_foreground'])) if 'active_tab_background' in spec: self.active_bg = (spec['active_tab_background'] << 8) | 2 self.draw_data = self.draw_data._replace(active_bg=color_from_int(spec['active_tab_background']))