choose-w misaligned (regression)

Bug #1891785 reported by gregrwm
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Tmux
Fix Released
Unknown
tmux (Ubuntu)
Fix Released
Wishlist
Paride Legovini
Focal
Triaged
Wishlist
Unassigned
Hirsute
Won't Fix
Wishlist
Unassigned
Impish
Won't Fix
Wishlist
Unassigned

Bug Description

choose-window produces a sensibly aligned list
on centos7 (tmux-1.8-4.el7.x86_64):
(0) 0: htop "umari"
(1) 1: bash "umari"
(2) 2: bash- "umari"
(3) 3: bash* "umari"

and ubuntu xenial (tmux 2.1-3build1):
(0) 0: [tmux]- "jocur"
(1) 1: bash* "jocur"

but more recent versions produce an annoyingly misaligned list due to the new session line:
(0) - 0: 4 windows (attached)
(1) ├─> 0: man- (1 panes) "e540"
(2) ├─> 1: bash (1 panes) "e540"
(3) ├─> 2: ssh* (1 panes) "e540"
(4) ├─> 3: bash (1 panes) "e540"

so when you choose a window from the new choose-window list, you have to look carefully and choose "the wrong window" or you get the wrong window! is there a way to fix or workaround this problem?

because this shows 0 on windows other than window 2:
$ tmux bi w choose-t -wF'#{==:#{window_index},2}'
(0) - 0: 1
(1) ├─> 0: 0
(2) ├─> 1: 0
(3) ├─> 2: 1
(4) ├─> 3: 0

thus this eliminates windows other than window 2:
$ tmux bi w choose-t -wf'#{==:#{window_index},2}'
(0) - 0: 6 windows (attached)
(1) └─> 2: ssh* (1 panes) "e540"

so similarly since this shows 0 on the session line and 1 on each window:
$ tmux bi w choose-t -wF'#{window_format}'
(0) - 0: 0
(1) ├─> 0: 1
(2) ├─> 1: 1
(3) ├─> 2: 1
(4) ├─> 3: 1

you'd expect this to eliminate the session line, and restore proper alignment of the choose-window listing, but strangely it just doesn't:
$ tmux bi w choose-t -wf'#{window_format}'
(0) - 0: 4 windows (attached)
(1) ├─> 0: man- (1 panes) "e540"
(2) ├─> 1: bash (1 panes) "e540"
(3) ├─> 2: ssh* (1 panes) "e540"
(4) ├─> 3: bash (1 panes) "e540"

so a fix or workaround would be greatly appreciated!

A solution is available, see comment #7.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: tmux 3.0a-2
ProcVersionSignature: Ubuntu 5.4.0-42.46-generic 5.4.44
Uname: Linux 5.4.0-42-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.4
Architecture: amd64
CasperMD5CheckResult: skip
Date: Sat Aug 15 21:05:07 2020
InstallationDate: Installed on 2020-03-15 (153 days ago)
InstallationMedia: Lubuntu 20.04 LTS "Focal Fossa" - Alpha amd64 (20200314)
ProcEnviron:
 LC_TIME=en_DK.utf8
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: tmux
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
gregrwm (gregrwm) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

Is this related to bug 1875109? A fix for that bug is in the works and is ready for testing. Perhaps you could test that proposed package to see if it fixes your issue?

I'm setting Importance to Low because this bug as reported affects only unusual end user configurations. I therefore don't expect expert help on this bug soon. Feel free to continue using this bug to coordinate efforts, and if you find a specific fix, then we'd be happy to help you land it.

Changed in tmux (Ubuntu):
importance: Undecided → Low
tags: added: regression-release
Revision history for this message
gregrwm (gregrwm) wrote :

no not related to that bug. i rewrote the description, is it more clear now? frankly i expect this affects virtually everyone, and most folks are just trying to ignore the annoyance.

description: updated
Revision history for this message
Paride Legovini (paride) wrote :

Hi,

What you describe appears to be an upstream change and it can't be considered as a bug in Ubuntu. There are several threads with requests similar to yours with proposed workarounds which I hope you'll find helpful:

https://github.com/tmux/tmux/issues/1115
https://github.com/tmux/tmux/issues/1977
https://unix.stackexchange.com/questions/400009/how-to-get-tmux-to-only-show-windows-when-using-choose-tree

I'm marking this bug report as Incomplete for the moment. If you agree this is not actually a bug in Ubuntu then please change the report status to Invalid, otherwise comment back, change the report status back to New and we'll look at it again. Thanks!

Changed in tmux (Ubuntu):
status: New → Incomplete
Revision history for this message
gregrwm (gregrwm) wrote :

agreed, an upstream issue, and agree, those threads are the same issue.

however your comment seems to advocate the idea that launchpad isn't a venue for bugs in software distributed by ubuntu. while i understand that idea, i think the majority opinion, even the design intention, is that launchpad is a venue of choice even for bugs that originate upstream, and it's very common for launchpad bugs to refer to other bug database entries, especially upstream ones.

imo the threads you mention justify this bug being marked 'confirmed'.

Changed in tmux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Paride Legovini (paride) wrote :

Hello gregrwn and thanks for confirming those threads are about this very issue.

There's certainly place in Launchpad for upstream bugs, provided that they're recognized as such. In this case it doesn't seems that upstream recognizes the new behavior as a bug (this is why in comment 4 I refer to it as an "upstream change", and not to an "upstream bug"). Given that upstream doesn't recognize the change as a bug, and that the change doesn't affect Ubuntu users so badly to justify permanently diverging from upstream to make the package behave differently from what upstream intended, it is difficult to consider this "a bug in Ubuntu".

I think the most appropriate status for this report is Opinion ("Doesn't fit with the project, but can we discussed"). This is not to dismiss your report, but rather not to set false expectations.

Changed in tmux (Ubuntu):
status: Confirmed → Opinion
importance: Low → Wishlist
Revision history for this message
gregrwm (gregrwm) wrote :

A solution is available, with a updated copy of tmux, and a recipe, see:

http://github.com/tmux/tmux/issues/2636#issuecomment-817542083

description: updated
gregrwm (gregrwm)
description: updated
Revision history for this message
Paride Legovini (paride) wrote :

Thanks for that pointer! AIUI the commit implementing the functionality you were looking for is:

https://github.com/tmux/tmux/commit/cd208c9d72df79a34024df6b8eb8f984613de8ef

which has been first released in tmux 3.2a. That's not (yet) in Ubuntu (not even in the current devel release), but it's already in Debian testing. This means the functionality will land in Ubuntu with the next sync from Debian, during the 22.04 development cycle.

The bug doesn't qualify for a SRU (see [1]), but good to know it will be address in time for the next LTS. (An updated package could be provided via a backports, but first we need the a newer tmux to land in Ubuntu.)

I'm updating the bug status a bit to reflect all of this.

[1] https://wiki.ubuntu.com/StableReleaseUpdates#When

Changed in tmux (Ubuntu):
status: Opinion → Fix Committed
assignee: nobody → Paride Legovini (paride)
Changed in tmux:
status: Unknown → Fix Released
Revision history for this message
Paride Legovini (paride) wrote :

Jammy now ships tmux 3.2a, so I'm marking the devel task as Fix Released, but adding Focal, Hirsute and Impish as Triaged with Importance: Wishlist.

Changed in tmux (Ubuntu):
status: Fix Committed → Fix Released
Changed in tmux (Ubuntu Focal):
status: New → Triaged
Changed in tmux (Ubuntu Hirsute):
status: New → Triaged
Changed in tmux (Ubuntu Impish):
status: New → Triaged
Changed in tmux (Ubuntu Focal):
importance: Undecided → Wishlist
Changed in tmux (Ubuntu Hirsute):
importance: Undecided → Wishlist
Changed in tmux (Ubuntu Impish):
importance: Undecided → Wishlist
Revision history for this message
Lena Voytek (lvoytek) wrote :

Hirsute is no longer in support.

Changed in tmux (Ubuntu Hirsute):
status: Triaged → Won't Fix
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Impish has reached end of standard support.

Changed in tmux (Ubuntu Impish):
status: Triaged → Won't Fix
Revision history for this message
gregrwm (gregrwm) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.