Fix a regression that broke specifying OS window size in the session file

Fixes #2908
This commit is contained in:
Kovid Goyal 2020-08-10 21:55:54 +05:30
parent 817f0997cf
commit f6ece6522e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,10 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
dimensions or the thickness of the line is an odd number of pixels
(:iss:`2907`)
- Fix a regression that broke specifying OS window size in the session file
(:iss:`2908`)
0.18.2 [2020-07-28]
--------------------

View File

@ -21,6 +21,7 @@ class WindowSizeOpts(NamedTuple):
initial_window_height: Tuple[int, str]
window_margin_width: FloatEdges
window_padding_width: FloatEdges
single_window_margin_width: FloatEdges
remember_window_size: bool
@ -124,7 +125,7 @@ def parse_session(raw: str, opts: Options, default_title: Optional[str] = None)
elif cmd == 'os_window_size':
from kitty.config_data import window_size
w, h = map(window_size, rest.split(maxsplit=1))
ans.os_window_size = WindowSizeOpts(w, h, opts.window_margin_width, opts.window_padding_width, False)
ans.os_window_size = WindowSizeOpts(w, h, opts.window_margin_width, opts.window_padding_width, opts.single_window_margin_width, False)
elif cmd == 'os_window_class':
ans.os_window_class = rest
else: