GNU bug report logs - #52324
29.0.50; "Padded" mode line lacks uniform border

Previous Next

Package: emacs;

Reported by: Protesilaos Stavrou <info <at> protesilaos.com>

Date: Mon, 6 Dec 2021 08:59:02 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 52324 <at> debbugs.gnu.org, info <at> protesilaos.com
Subject: bug#52324: 29.0.50; "Padded" mode line lacks uniform border
Date: Sat, 11 Dec 2021 15:47:24 +0200
> Date: Mon, 06 Dec 2021 16:47:17 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 52324 <at> debbugs.gnu.org
> 
> > From: Protesilaos Stavrou <info <at> protesilaos.com>
> > Date: Mon, 06 Dec 2021 10:58:02 +0200
> > 
> > In an emacs -Q session with version 27 we could evaluate the following
> > to make the mode line look more spacious ("padded", so to speak):
> > 
> >     (setq x-underline-at-descent-line t)
> > 
> >     (set-face-attribute 'mode-line nil
> >                         :foreground "black"
> >                         :background "gray80"
> >                         :box '(:line-width 6 :color "gray80")
> >                         :overline "gray30"
> >                         :underline "gray30"
> >                         :distant-foreground 'unspecified)
> > 
> > Whereas with master, the same results in a box with interrupted lines.
> 
> This seems to be a general bug regarding display of stretches of
> whitespace with overline and underline.  In Emacs 27, after evaluating
> the above settings, try this:
> 
>    M-: (setq mode-line-format "%b		%p HELLO") RET
> 
> where the whitespace between %b and %p is 2 TAB characters.  you will
> see that the stretch glyph produced for the TABs lacks the overline
> and underline in Emacs 27 as well.
> 
> So this is not a bug introduced by the recent changes in the mode
> line, it is a bug that was always in Emacs, and those recent changes
> just exposed it.
> 
> I'll try to dig into this when I have time.

Lu, can you help?  This has something to do with clipping, because the
overline disappears in this call to x_reset_clip_rectangles at the end
of x_draw_glyph_string:


  /* Reset clipping.  */
  x_reset_clip_rectangles (s->f, s->gc);  <<<<<<<<<<<<<<<<<<<<<<<<<
  s->num_clips = 0;

Before that call, I see the overline and underline of the stretch
glyph on the mode line as expected.  But I cannot understand what is
missing to avoid this removal of the overline and underline.




This bug report was last modified 3 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.