From 1f1b52b580ca45f7767c14e9c45f885a7e474c3f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 9 Apr 2020 12:40:09 +0530 Subject: [PATCH] Fix specifying options for layouts in the startup session file not working Fixes #2520 --- docs/changelog.rst | 3 +++ kitty/session.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 430cf98cb..c37756de2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -22,6 +22,9 @@ To update |kitty|, :doc:`follow the instructions `. - diff kitten: New option to control the background color for filler lines in the margin (:iss:`2518`) +- Fix specifying options for layouts in the startup session file not working + (:iss:`2520`) + 0.17.2 [2020-03-29] -------------------- diff --git a/kitty/session.py b/kitty/session.py index b31bffd67..5f8f8b258 100644 --- a/kitty/session.py +++ b/kitty/session.py @@ -53,7 +53,7 @@ class Session: self.tabs[-1].next_title = title.strip() def set_layout(self, val: str) -> None: - if val not in all_layouts: + if val.partition(':')[0] not in all_layouts: raise ValueError('{} is not a valid layout'.format(val)) self.tabs[-1].layout = val