GNU bug report logs -
#68374
min-width is not correctly treated by buffer-text-pixel-size
Previous Next
Reported by: JD Smith <jdtsmith <at> gmail.com>
Date: Wed, 10 Jan 2024 22:24:01 UTC
Severity: normal
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 68374 <at> debbugs.gnu.org (full text, mbox):
> From: JD Smith <jdtsmith <at> 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
This bug report was last modified 1 year and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.