GNU bug report logs - #56874
28.1.50; tab-bar-format-align-right should probably use string-width

Previous Next

Package: emacs;

Reported by: Adam Porter <adam <at> alphapapa.net>

Date: Mon, 1 Aug 2022 16:50:02 UTC

Severity: minor

Tags: moreinfo

Found in version 28.1.50

Fixed in version 29.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Adam Porter <adam <at> alphapapa.net>
Cc: 56874 <at> debbugs.gnu.org
Subject: bug#56874: 28.1.50; tab-bar-format-align-right should probably use string-width
Date: Mon, 01 Aug 2022 21:13:43 +0300
> I noticed that, when I added a mode line construct to global-mode-line and
> enabled the display of such in the tab line (using
> tab-bar-format-align-right, etc.), the construct wrapped onto a second line
> in the tab bar.  I looked at the source code of tab-bar-format-align-right
> and noticed that it uses length instead of string-width.  I changed it to
> string-width and it fixed the problem.
>
> Note that a similar problem remains: if the tab-bar face has, for example,
> a larger height than the default face, the width will still be incorrectly
> calculated, causing wrapping onto a new line.  I don't know how to fix
> that, since window-text-pixel-size requires a buffer and a window.
>
> But this is an improvement, anyway.

Please check Emacs 29 where tab-bar-format-align-right
contains a better improvement:

  (string-pixel-width (propertize rest 'face 'tab-bar))

Does this work in your case as well?




This bug report was last modified 2 years and 290 days ago.

Previous Next


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