From 4f2359a455d6a98e993fc130abc46652983d0799 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jul 2026 12:33:00 +0530 Subject: [PATCH] Fix secure_input_symbol rendering in tab title template --- kitty/tab_bar.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 55f96c507..914c2cadc 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -304,7 +304,6 @@ def apply_title_template(draw_data: DrawData, tab: TabBarData, index: int, max_t 'layout_name': tab.layout_name, 'num_windows': tab.num_windows, 'num_window_groups': tab.num_window_groups, - 'secure_input_symbol': si, 'title': tab.title, 'tab': ta, } @@ -327,6 +326,7 @@ def apply_title_template(draw_data: DrawData, tab: TabBarData, index: int, max_t 'sup': SupSub(data), 'sub': SupSub(data, True), 'bell_symbol': draw_data.bell_on_tab if tab.needs_attention else '', + 'secure_input_symbol': si, 'activity_symbol': draw_data.tab_activity_symbol if tab.has_activity_since_last_focus else '', 'max_title_length': max_title_length, 'keyboard_mode': boss.mappings.current_keyboard_mode_name, @@ -335,10 +335,9 @@ def apply_title_template(draw_data: DrawData, tab: TabBarData, index: int, max_t if tab.is_active and draw_data.active_title_template is not None: template = draw_data.active_title_template prefix = '' - if eval_locals['bell_symbol'] and not template_has_field(template, 'bell_symbol'): - prefix = '{bell_symbol}' - if eval_locals['activity_symbol'] and not template_has_field(template, 'activity_symbol'): - prefix += '{activity_symbol}' + for default_prefix in ('bell_symbol', 'activity_symbol', 'secure_input_symbol'): + if eval_locals[default_prefix] and not template_has_field(template, default_prefix): + prefix += '{' + default_prefix + '}' if prefix: template = '{fmt.fg.red}' + prefix + '{fmt.fg.tab}' + template eval_locals['custom'] = load_custom_draw_title(eval_locals)