all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: JD Smith <jdtsmith@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68374@debbugs.gnu.org
Subject: bug#68374: min-width is not correctly treated by buffer-text-pixel-size
Date: Thu, 11 Jan 2024 14:53:57 -0500	[thread overview]
Message-ID: <6F7F2B38-8340-44B3-9760-F3C9322A06CE@gmail.com> (raw)
In-Reply-To: <831qaomam3.fsf@gnu.org>

Great, this small patch seems to work.  I’ve enabled glyph checking and will report here if anything untoward comes up.  Should I be keeping track of the *warnings* buffer?

> 
> On Jan 11, 2024, at 5:24 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: JD Smith <jdtsmith@gmail.com>
>> Date: Wed, 10 Jan 2024 17:22:53 -0500
>> 
>> 
>> When the ‘display min-width property is used on characters in a buffer, window/buffer-text-pixel-size does not include this min-width padding in its calculation of the text's pixel width.  
> 
> For some reason I cannot understand, we were ignoring min-width when
> simulating display (as opposed to actually displaying stuff in a
> window).  I can only assume it's some kind of left-over from when Lars
> was developing this feature, where calls from functions that simulate
> display caused him trouble, so he disabled that and forgot to
> re-enable later.  At least I cannot find any discussion of this, and
> the code which disables min-width in these situations was in the
> initial version that landed on master.
> 
> So please try running with the patch below for a couple of weeks, and
> if it doesn't cause you any trouble, I will install it on master.
> Please configure your builds with --enable-checking='yes,glyphs' for
> the duration of this test period, to activate some run-time tests and
> assertions that will hopefully flag any problems this change might
> have.
> 
> TIA
> 
> diff --git a/src/xdisp.c b/src/xdisp.c
> index 14cf030..29ac4a4 100644
> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -5487,9 +5487,6 @@ display_min_width (struct it *it, ptrdiff_t bufpos,
>   if (!NILP (it->min_width_property)
>       && !EQ (width_spec, it->min_width_property))
>     {
> -      if (!it->glyph_row)
> -	return;
> -
>       /* When called from display_string (i.e., the mode line),
> 	 we're being called with a string as the object, and we
> 	 may be called with many sub-strings belonging to the same






  reply	other threads:[~2024-01-11 19:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-10 22:22 bug#68374: min-width is not correctly treated by buffer-text-pixel-size JD Smith
2024-01-11 10:24 ` Eli Zaretskii
2024-01-11 19:53   ` JD Smith [this message]
2024-01-12  7:05     ` Eli Zaretskii
2024-01-12 16:45       ` JD Smith
2024-01-12 18:09         ` Eli Zaretskii
2024-02-11  8:47     ` Eli Zaretskii
2024-02-11 12:20       ` JD Smith
2024-02-11 13:22         ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F7F2B38-8340-44B3-9760-F3C9322A06CE@gmail.com \
    --to=jdtsmith@gmail.com \
    --cc=68374@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.