Support layouts with multiple panes of same type

This commit is contained in:
2Shirt 2019-11-11 17:29:58 -07:00
parent 72905f9ccc
commit 49c0ce9a62
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -36,13 +36,16 @@ def fix_layout(panes, layout, forced=False):
if name not in panes: if name not in panes:
continue continue
# Resize pane # Resize pane(s)
pane_id = panes[name] pane_list = panes[name]
try: if isinstance(pane_list, str):
resize_pane(pane_id, **data) pane_list = [pane_list]
except RuntimeError: for pane_id in pane_list:
# Assuming pane was closed just before resizing try:
pass resize_pane(pane_id, **data)
except RuntimeError:
# Assuming pane was closed just before resizing
pass
def get_pane_size(pane_id=None): def get_pane_size(pane_id=None):