GNU bug report logs - #37667
27.0.50; Tab Bar display problems with more than 5 tabs

Previous Next

Package: emacs;

Reported by: Eli Zaretskii <eliz <at> gnu.org>

Date: Tue, 8 Oct 2019 18:57:02 UTC

Severity: normal

Found in version 27.0.50

Full log


Message #128 received at 37667 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 37667 <at> debbugs.gnu.org
Subject: Re: bug#37667: 27.0.50; Tab Bar display problems with more than 5 tabs
Date: Thu, 31 Oct 2019 22:46:49 +0200
>> Before starting to search the current tab, the code needs to known
>> whether truncation really occurred.
>
> Can you explain why?  Don't you keep the ordinal number of the current
> tab somewhere?  If not, can you keep it?  Given the number, finding
> the tab should be trivial, no?  (At least for some values of "find".)

Detection of truncation is necessary as a separate function to decide
whether to display arrow buttons in the tab-line.  When the tab-line
is not truncated and displayed in its entirety, then there is no need
to display arrow buttons for hscrolling.

>> We need to detect whether the current tab is before the right truncation point
>> (so it is visible), or after the truncation (so the current tab is not visible).
>
> You already keep the number of tabs you've hscrolled off the display,
> right?

Yes, the number of hscrolled tabs is kept in the window parameter.

> So if you also keep the number of the current tab, the above
> decisions become trivial, no?  Or what am I missing?

To get the ordinal number of the current tab is trivial indeed, but when
due to the large number of tabs preceding the current tab on the left side
from it, it gets pushed off-screen behind the right window edge, we need
to set the window parameter for the number of hscrolled tabs to such
number of tabs that will reduce the length of displayed tabs on
the left side from the current tab, so it becomes visible again.

C code is only need to calculate the number of tabs to cut on the left
side from the current tab to make it visible.




This bug report was last modified 4 years and 276 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.