regression: splitting panes does not cause a resize in backgrounded tmux
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tmux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Sergio Durigan Junior | ||
Groovy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
This is a fix to a problem that happens when the user splits up tmux windows (using 'split-window') while running tmux in the background (i.e., not attached to a pty). In this scenario, tmux should automatically resize the panes and the applications running inside them, but it doesn't.
The cherry-picked fix, which has been pushed upstream already, can be found at:
https:/
[Test Case]
To reproduce the bug, one can use a slightly modified version of the upstream bug reporter's script.
$ lxc launch ubuntu-daily:focal tmux-bug1875109
$ lxc shell tmux-bug1875109
# apt update && apt install tmux
# cat > reproducer.sh << __EOF__
#!/usr/bin/env bash
set -euo pipefail
TMUX="tmux"
tmux_cmd() { "${TMUX}" -u -L demo-session "$@"; }
msg() { echo -e "\033[1m+ $*\033[m"; }
msg tmux version
"${TMUX}" -V
msg starting tmux...
tmux_cmd new-session -d -x 80 -y 8 nano --ignorercfiles
sleep .5
tmux_cmd send-keys -t0 aaaaaaaaaaaaaaa
tmux_cmd send-keys -t0 Enter
sleep .5
msg 'this is nano at full width:'
tmux_cmd capture-pane -pt0
tmux_cmd split-window -ht0 -l 50 sleep infinity
sleep .5
msg 'this is nano at smaller width (should have "Modified" + $ at eol):'
tmux_cmd capture-pane -pt0
msg 'trying to grep Modified'
if ! tmux_cmd capture-pane -pt0 | grep Modified; then
msg "@@@@@@@@ BUG DETECTED @@@@@@@@"
else
msg "@@@@@@@@ NO BUG FOUND @@@@@@@@"
fi
msg cleaning up...
tmux_cmd kill-pane -t1
# quit nano to exit tmux
tmux_cmd send-keys -t0 '^X'
tmux_cmd send-keys -t0 'n'
sleep .5
tmux_cmd kill-session >& /dev/null || true
__EOF__
# chmod +x reproducer.sh
# ./reproducer.sh
Look for "@@@@@@@@ BUG DETECTED @@@@@@@@" in the output.
[Regression Potential]
* The fix is extremely simple and self-contained: it teaches tmux to detect whether a window is in an unattached session, and resizes it in this case.
* The changes are localized to the client's screen drawing behaviour, so irregularities in drawing behaviour would be what to watch for with regressions.
[Original Description]
This is the same as this upstream issue: https:/
this is present in 3.0a-2 for ubuntu focal
there is a patch listed here -- alternatively, it looks like this is fixed in 3.1: https:/
Related branches
- Bryce Harrington (community): Approve
- Canonical Server: Pending requested
- Canonical Server Core Reviewers: Pending requested
-
Diff: 111 lines (+79/-1)4 files modifieddebian/changelog (+10/-0)
debian/control (+2/-1)
debian/patches/limit-lazy-resize-to-panes-in-attached-sessions-only.patch (+66/-0)
debian/patches/series (+1/-0)
Changed in tmux (Ubuntu Focal): | |
status: | New → Triaged |
Changed in tmux (Ubuntu Groovy): | |
status: | New → Triaged |
Changed in tmux (Ubuntu Focal): | |
assignee: | nobody → Sergio Durigan Junior (sergiodj) |
description: | updated |
I'll take a look at this one.