Avoid crash if tmux pane closes while getting size

This commit is contained in:
2Shirt 2019-12-06 12:25:48 -07:00
parent e1ef9db6b6
commit 56a99a8a4e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -105,7 +105,11 @@ def layout_needs_fixed(panes, layout):
if isinstance(pane_list, str):
pane_list = [pane_list]
for pane_id in pane_list:
width, height = get_pane_size(pane_id)
try:
width, height = get_pane_size(pane_id)
except ValueError:
# Pane may have disappeared during this loop
continue
if data.get('width', False) and data['width'] != width:
needs_fixed = True
if data.get('height', False) and data['height'] != height: