mirror of
https://github.com/tmux/tmux.git
synced 2026-10-12 05:34:24 +00:00
Use the pane's own zoom flag for the border button.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1584,7 +1584,7 @@ const struct options_table_entry options_table[] = {
|
|||||||
"#{?#{pane_floating_flag},t,f}"
|
"#{?#{pane_floating_flag},t,f}"
|
||||||
"]#[norange]"
|
"]#[norange]"
|
||||||
"#[range=control|8]["
|
"#[range=control|8]["
|
||||||
"#{?#{window_zoomed_flag},u,z}"
|
"#{?#{pane_zoomed_flag},u,z}"
|
||||||
"]#[norange]"
|
"]#[norange]"
|
||||||
"#[range=control|9][x]#[norange]"
|
"#[range=control|9][x]#[norange]"
|
||||||
",}",
|
",}",
|
||||||
|
|||||||
@@ -47,5 +47,15 @@ got=$($TMUX display-message -p -t "$other" '#{pane_zoomed_flag}')
|
|||||||
got=$($TMUX display-message -p -t "$active" '#{pane_zoomed_flag}')
|
got=$($TMUX display-message -p -t "$active" '#{pane_zoomed_flag}')
|
||||||
[ "$got" = "0" ] || fail "active pane zoomed flag '$got', expected '0'"
|
[ "$got" = "0" ] || fail "active pane zoomed flag '$got', expected '0'"
|
||||||
|
|
||||||
|
# Only the zoomed pane shows the unzoom button. A floating pane above it is not
|
||||||
|
# zoomed so it shows the zoom button, whatever else is zoomed.
|
||||||
|
$TMUX new-pane -d -x 24 -y 5 -X 20 -Y 3 'sleep 100' || fail "new-pane failed."
|
||||||
|
sleep 1
|
||||||
|
screen=$($TMUX2 capture-pane -p -t "$OUTER")
|
||||||
|
u=$(echo "$screen" | grep -o '\[u\]' | wc -l)
|
||||||
|
z=$(echo "$screen" | grep -o '\[z\]' | wc -l)
|
||||||
|
[ "$u" -eq 1 ] && [ "$z" -eq 1 ] ||
|
||||||
|
fail "found $u unzoom and $z zoom buttons, expected one of each"
|
||||||
|
|
||||||
cleanup
|
cleanup
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user