Allow leading/trailing spaces in tab_activity_symbol

This commit is contained in:
Kovid Goyal 2021-07-23 22:26:10 +05:30
parent 8f214c51c0
commit e48adf7a07
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 5 additions and 2 deletions

View File

@ -58,6 +58,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
is meant to match over line breaks, you will need to match over both.
(:iss:`3845`)
- Allow leading or trailing spaces in :opt:`tab_activity_symbol`
0.21.2 [2021-06-28]
----------------------

View File

@ -932,7 +932,8 @@ opt('tab_activity_symbol', 'none',
option_type='tab_activity_symbol',
long_text='''
Some text or a unicode symbol to show on the tab if a window in the tab that
does not have focus has some activity.
does not have focus has some activity. If you want to use leading or trailing spaces
surround the text with quotes.
'''
)

View File

@ -614,7 +614,7 @@ def tab_fade(x: str) -> Tuple[float, ...]:
def tab_activity_symbol(x: str) -> Optional[str]:
if x == 'none':
return None
return x or None
return tab_title_template(x) or None
def tab_title_template(x: str) -> str: