From ab4e86dfec9e607fac1427db901207afe7ca3922 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 30 Aug 2025 09:03:34 +0530 Subject: [PATCH] Avoid a copy when custom function is not used --- kitty/tab_bar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/tab_bar.py b/kitty/tab_bar.py index 097e9dfb3..ad72a8cfd 100644 --- a/kitty/tab_bar.py +++ b/kitty/tab_bar.py @@ -526,7 +526,7 @@ class CustomDrawTitleFunc: def __init__(self, data: dict[str, Any], implementation: Callable[[dict[str, Any]], str] | None = None): self._implementation = implementation - self._data = data.copy() + self._data = {} if implementation is None else data.copy() def __str__(self) -> str: if self._implementation is None: