mirror of
https://github.com/tmux/tmux.git
synced 2026-10-11 04:44:25 +00:00
Do not count siblings of a hidden pane that is the root of the layout.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,6 +279,27 @@ run rotate-window -Z
|
|||||||
check "$A" '#{pane_hidden_flag}' 0
|
check "$A" '#{pane_hidden_flag}' 0
|
||||||
check "$B" '#{pane_hidden_flag}' 0
|
check "$B" '#{pane_hidden_flag}' 0
|
||||||
|
|
||||||
|
# Hiding every pane, then showing and closing them one by one, leaves the last
|
||||||
|
# pane hidden as the only pane in the window; showing it must not crash.
|
||||||
|
reset
|
||||||
|
C=$(run split-window -dPF '#{pane_id}') || exit 1
|
||||||
|
for p in "$A" "$B" "$C"; do
|
||||||
|
run resize-pane -H -t "$p"
|
||||||
|
done
|
||||||
|
for p in "$A" "$B"; do
|
||||||
|
run select-pane -t "$p"
|
||||||
|
hidden "$p" 0
|
||||||
|
run kill-pane -t "$p"
|
||||||
|
done
|
||||||
|
hidden "$C" 1
|
||||||
|
check "$C" '#{window_panes}' 1
|
||||||
|
run select-pane -t "$C"
|
||||||
|
hidden "$C" 0
|
||||||
|
check "$C" '#{pane_active}:#{pane_width}x#{pane_height}' '1:80x24'
|
||||||
|
run resize-pane -H -t "$C"
|
||||||
|
run resize-pane -H -t "$C"
|
||||||
|
hidden "$C" 0
|
||||||
|
|
||||||
# Floating and tiling a hidden pane keeps it hidden.
|
# Floating and tiling a hidden pane keeps it hidden.
|
||||||
reset
|
reset
|
||||||
run resize-pane -H -t "$B"
|
run resize-pane -H -t "$B"
|
||||||
|
|||||||
2
window.c
2
window.c
@@ -1027,6 +1027,8 @@ window_count_tiled_siblings(struct layout_cell *lc)
|
|||||||
struct layout_cell *lcsib;
|
struct layout_cell *lcsib;
|
||||||
u_int n = 0;
|
u_int n = 0;
|
||||||
|
|
||||||
|
if (lc->parent == NULL)
|
||||||
|
return (0);
|
||||||
TAILQ_FOREACH(lcsib, &lc->parent->cells, entry) {
|
TAILQ_FOREACH(lcsib, &lc->parent->cells, entry) {
|
||||||
if (lcsib == lc)
|
if (lcsib == lc)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user