Fix enabled_layouts in session files not being respected

This commit is contained in:
Kovid Goyal
2018-02-20 10:01:41 +05:30
parent 8f423c6d8f
commit 96d241e9f3
2 changed files with 5 additions and 3 deletions

View File

@@ -59,6 +59,8 @@ class Session:
def set_enabled_layouts(self, raw):
self.tabs[-1].enabled_layouts = to_layout_names(raw)
if self.tabs[-1].layout not in self.tabs[-1].enabled_layouts:
self.tabs[-1].layout = self.tabs[-1].enabled_layouts[0]
def set_cwd(self, val):
self.tabs[-1].cwd = val