[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56874: 28.1.50; tab-bar-format-align-right should probably use strin
From: |
Juri Linkov |
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 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
> 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?