unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59311@debbugs.gnu.org, gabriel376@hotmail.com
Subject: bug#59311: 29.0.50; tab-bar global-mode-string affected by global-display-line-numbers
Date: Sat, 19 Nov 2022 21:03:08 +0200	[thread overview]
Message-ID: <86o7t292y3.fsf@mail.linkov.net> (raw)
In-Reply-To: <83v8ncbqly.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 18 Nov 2022 10:42:49 +0200")

>> @@ -322,6 +322,8 @@ string-pixel-width
>>      (with-current-buffer (get-buffer-create " *string-pixel-width*")
>> +      (when display-line-numbers-mode
>> +        (display-line-numbers-mode -1))
>>        (delete-region (point-min) (point-max))
>>        (insert string)
>>        (car (buffer-text-pixel-size nil nil t)))))
>
> Yes.  Or subtract what (line-number-display-width t) returns (it will
> return zero when line-numbers are turned OFF).

Shouldn't then buffer-text-pixel-size subtract line-number-display-width?
Isn't this the responsibility of buffer-text-pixel-size,
not responsibility of a caller like string-pixel-width?





  parent reply	other threads:[~2022-11-19 19:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 16:10 bug#59311: 29.0.50; tab-bar global-mode-string affected by global-display-line-numbers Gabriel
2022-11-18  7:15 ` Juri Linkov
2022-11-18  8:42   ` Eli Zaretskii
2022-11-18  9:46     ` Juanma Barranquero
2022-11-18 11:48       ` Eli Zaretskii
2022-11-19 19:03     ` Juri Linkov [this message]
2022-11-19 19:46       ` Eli Zaretskii
2022-11-20  8:20         ` Juri Linkov
2022-11-20  8:36           ` Eli Zaretskii
2022-11-20 18:02             ` 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=86o7t292y3.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=59311@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gabriel376@hotmail.com \
    /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).