Skip to content

Commit 36163fd

Browse files
committed
Ensure current layout is in enabled layouts when serializing
1 parent dcf4fc7 commit 36163fd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

kitty/tabs.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,15 @@ def make_relative(cwd: str) -> str:
321321
if i == active_idx:
322322
launch_cmds.append('focus')
323323
if launch_cmds:
324+
enabled_layouts = list(self.enabled_layouts)
325+
layout = self._current_layout_name
326+
if layout not in enabled_layouts:
327+
enabled_layouts.append(layout)
324328
return [
325329
'',
326330
f'new_tab {self.name}'.rstrip(),
327-
f'layout {self._current_layout_name}',
328-
f'enabled_layouts {",".join(self.enabled_layouts)}',
331+
f'layout {layout}',
332+
f'enabled_layouts {",".join(enabled_layouts)}',
329333
f'set_layout_state {json.dumps(self.current_layout.serialize(self.windows))}',
330334
f'cd {most_common_cwd}',
331335
''

0 commit comments

Comments
 (0)