diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-16 16:47:50 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-16 16:47:50 -0400 |
| commit | 46ed06877167c43fca692b35f3a069d346041768 (patch) | |
| tree | e3869e9ec603a09011900db22af69f1f56dd9e89 | |
| parent | Fix bug with assuming first pane is at index 1 (diff) | |
| download | tmux-toggle-term-46ed06877167c43fca692b35f3a069d346041768.zip | |
Adjust comment
| -rwxr-xr-x | toggle-term.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/toggle-term.sh b/toggle-term.sh index d19fd70..ba6dc89 100755 --- a/toggle-term.sh +++ b/toggle-term.sh @@ -91,8 +91,10 @@ toggle_split() { # If we have more than 1 pane and none are zoomed in, we can assume the # screen has the split pane open. # - # To simulate 'toggling' between the main pane and the split - # pane, we 'zoom' the main pane so it takes up the full screen. + # So, to simulate 'toggling' between the main (first) pane and the split + # pane, we 'zoom' the main pane so it takes up the full screen. Because + # the initial pane index is configurable in tmux, we grab the first pane + # index dynamically. first_pane_index="$($TMUX_CMD list-panes -F '#{pane_index}' | head -n1)" $TMUX_CMD resize-pane -Z -t"$first_pane_index" } |