From e73b30c66374850a793ca881a04a06ff8b6ec430 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 18 Nov 2016 15:43:09 +0530 Subject: [PATCH] Fix window title not correct --- kitty/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kitty/utils.py b/kitty/utils.py index 3486aa725..3ebcb9e7e 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -95,6 +95,7 @@ def get_child_status(): except ChildProcessError: del fork_child.pid + base_size = sys.getsizeof('') @@ -113,9 +114,7 @@ def timeit(name, do_timing=False): def sanitize_title(x): - if isinstance(x, bytes): - x = x.decode('utf-8', 'replace') - return re.sub(r'\s+', ' ', re.sub(r'[\0-\x19]', '', x)) + return re.sub(br'\s+', b' ', re.sub(br'[\0-\x19]', b'', x)) def get_logical_dpi():