Avoid background crash when fixing the tmux layout
This commit is contained in:
parent
4202d3c1dc
commit
88d3ade64d
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue