Fix set_tab_title without prefilling not working

This commit is contained in:
Kovid Goyal 2026-03-25 20:16:15 +05:30
parent 0ddad7474b
commit f479c90533
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -2381,7 +2381,10 @@ def set_tab_title(self, title: str | None = None) -> None:
if (w := self.window_id_map.get(tab.renaming_in_window)) is not None and w in tab:
tab.set_active_window(w)
return
prefilled = (tab.name or tab.title).strip()
if title in ('" "', "' '"):
prefilled = ''
else:
prefilled = (tab.name or tab.title).strip()
tab_id = tab.id
def on_rename_done(new_title: str) -> None: