diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 661758c7e..045402ea2 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -96,6 +96,7 @@ Changed it caused some issues and then never re-applied. - Sending a command to an existing instance (via "qutebrowser :reload") now doesn't mark it as urgent anymore. +- `tabs -> title-format` now treats an empty string as valid. Deprecated ~~~~~~~~~~ diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index ab2638ec4..b9461c09d 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -650,7 +650,8 @@ def data(readonly=False): ('title-format', SettingValue(typ.FormatString( fields=['perc', 'perc_raw', 'title', 'title_sep', 'index', - 'id', 'scroll_pos', 'host']), '{index}: {title}'), + 'id', 'scroll_pos', 'host'], none_ok=True), + '{index}: {title}'), "The format to use for the tab title. The following placeholders " "are defined:\n\n" "* `{perc}`: The percentage as a string like `[10%]`.\n" diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 58ccc470b..dcf289452 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -106,7 +106,8 @@ class TabWidget(QTabWidget): fields['index'] = idx + 1 fmt = config.get('tabs', 'title-format') - self.tabBar().setTabText(idx, fmt.format(**fields)) + title = '' if fmt is None else fmt.format(**fields) + self.tabBar().setTabText(idx, title) def get_tab_fields(self, idx): """Get the tab field data."""