From dc6d5347feba71560ddc55f2e2d964e4945431ad Mon Sep 17 00:00:00 2001 From: TJ Hoplock Date: Sun, 5 Mar 2023 21:54:29 -0500 Subject: [PATCH] fix: don't redefine TMUXER_PANES when creating panes for --blank Use the global declared (empty) array that was added when adding `--blank` flag and adjust the iterator to add the full `$num` of empty panes, rather than redefining the array with a single empty pane and then adding `$num - 1` panes. --- tmuxer | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tmuxer b/tmuxer index 5fd40d8..82f10f4 100755 --- a/tmuxer +++ b/tmuxer @@ -67,8 +67,7 @@ while (( "$#" > 0 )); do TMUXER_BLANK=1 count="$(printf '%d\n' ${2} 2>/dev/null)" if [[ $count > 0 ]]; then - TMUXER_PANES=("") - for (( i=1; i<$count; i++ )); do + for (( i=0; i<$count; i++ )); do TMUXER_PANES+=("") done fi