mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-30 12:53:14 +00:00
Ensure config file is always decoded as UTF-8
This commit is contained in:
parent
e630abfe7f
commit
111c7fa57c
1 changed files with 2 additions and 2 deletions
|
|
@ -344,9 +344,9 @@ def parse_config(lines, check_keys=True):
|
|||
|
||||
|
||||
with open(
|
||||
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty.conf')
|
||||
os.path.join(os.path.dirname(os.path.abspath(__file__)), 'kitty.conf'), 'rb'
|
||||
) as f:
|
||||
defaults = parse_config(f.readlines(), check_keys=False)
|
||||
defaults = parse_config(f.read().decode('utf-8').splitlines(), check_keys=False)
|
||||
Options = namedtuple('Defaults', ','.join(defaults.keys()))
|
||||
defaults = Options(**defaults)
|
||||
actions = frozenset(a.func for a in defaults.keymap.values()) | frozenset({'combine', 'send_text', 'goto_tab'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue