Skip to content

Commit

Permalink
fix: don't redefine TMUXER_PANES when creating panes for --blank
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tjhop committed Mar 6, 2023
1 parent 08f4e58 commit dc6d534
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tmuxer
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc6d534

Please sign in to comment.