Avoid background crash when fixing the tmux layout

This commit is contained in:
2Shirt 2023-06-10 18:05:13 -07:00
parent 4202d3c1dc
commit 88d3ade64d
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -129,7 +129,12 @@ def get_pane_size(pane_id: str | None = None) -> tuple[int, int]:
# Get resolution
proc = run_program(cmd, check=False)
try:
width, height = proc.stdout.strip().split()
except ValueError:
# Assuming this is a race condition as it usually happens inside the
# background fix layout loop
return 0, 0
width = int(width)
height = int(height)