From: Juri Linkov <juri@linkov.net>
To: Adam Porter <adam@alphapapa.net>
Cc: 56874@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 [thread overview]
Message-ID: <86pmhjbzmw.fsf@mail.linkov.net> (raw)
In-Reply-To: <f9680d57-cf9d-862f-d937-2630bff859e4@alphapapa.net> (Adam Porter's message of "Mon, 1 Aug 2022 11:49:19 -0500")
> 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?
next prev parent reply other threads:[~2022-08-01 18:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-01 16:49 bug#56874: 28.1.50; tab-bar-format-align-right should probably use string-width Adam Porter
2022-08-01 18:13 ` Juri Linkov [this message]
2022-08-05 20:32 ` Adam Porter
2022-08-08 17:11 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86pmhjbzmw.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=56874@debbugs.gnu.org \
--cc=adam@alphapapa.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).