diff --git a/docs/changelog.rst b/docs/changelog.rst index a015af124..458f2fdf2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -75,6 +75,11 @@ command. Detailed list of changes ------------------------------------- +0.24.3 [future] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Fix a regression in the previous release that broke :opt:`active_tab_foreground` (:iss:`4620`) + 0.24.2 [2022-02-03] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/options/definition.py b/kitty/options/definition.py index bded5f131..fbf72286b 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -1064,7 +1064,7 @@ surround the text with quotes. See :opt:`tab_title_template` for how this is ren ''' ) -opt('tab_title_template', '"{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.default}{title}"', +opt('tab_title_template', '"{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}"', option_type='tab_title_template', long_text=''' A template to render the tab title. The default just renders the title with optional symbols for bell and activity. @@ -1079,7 +1079,7 @@ is done by Python's string formatting machinery, so you can use, for instance, :code:`{layout_name[:2].upper()}` to show only the first two letters of the layout name, upper-cased. If you want to style the text, you can use styling directives, for example: -:code:`{fmt.fg.red}red{fmt.fg.default}normal{fmt.bg._00FF00}green +:code:`{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}green bg{fmt.bg.tab}`. Similarly, for bold and italic: :code:`{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. Note that for backward compatibility, if :code:`{bell_symbol}` or :code:`{activity_symbol}` diff --git a/kitty/options/types.py b/kitty/options/types.py index b069cf239..559ce5b2c 100644 --- a/kitty/options/types.py +++ b/kitty/options/types.py @@ -565,7 +565,7 @@ class Options: tab_powerline_style: choices_for_tab_powerline_style = 'angled' tab_separator: str = ' ┇' tab_switch_strategy: choices_for_tab_switch_strategy = 'previous' - tab_title_template: str = '{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.default}{title}' + tab_title_template: str = '{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}' term: str = 'xterm-kitty' touch_scroll_multiplier: float = 1.0 update_check_interval: float = 24.0 diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 6e7c55d44..3d3470ae0 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -203,7 +203,7 @@ def draw_title(draw_data: DrawData, screen: Screen, tab: TabBarData, index: int) if eval_locals['activity_symbol'] and not template_has_field(template, 'activity_symbol'): prefix += '{activity_symbol}' if prefix: - template = '{fmt.fg.red}' + prefix + '{fmt.fg.default}' + template + template = '{fmt.fg.red}' + prefix + '{fmt.fg.tab}' + template try: title = eval(compile_template(template), {'__builtins__': {}}, eval_locals) except Exception as e: