mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-22 16:28:19 +02:00
Avoid a copy when custom function is not used
This commit is contained in:
@@ -526,7 +526,7 @@ class CustomDrawTitleFunc:
|
|||||||
|
|
||||||
def __init__(self, data: dict[str, Any], implementation: Callable[[dict[str, Any]], str] | None = None):
|
def __init__(self, data: dict[str, Any], implementation: Callable[[dict[str, Any]], str] | None = None):
|
||||||
self._implementation = implementation
|
self._implementation = implementation
|
||||||
self._data = data.copy()
|
self._data = {} if implementation is None else data.copy()
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
if self._implementation is None:
|
if self._implementation is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user