emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Identifying the face between STRETCH and right fringe.


From: Robert Pluim
Subject: Re: Identifying the face between STRETCH and right fringe.
Date: Tue, 27 Nov 2018 09:56:36 +0100

Eli Zaretskii <address@hidden> writes:

>> From: Robert Pluim <address@hidden>
>> Date: Fri, 23 Nov 2018 16:58:41 +0100
>> Cc: address@hidden
>> 
>> > Ah, okay.  Then we agree: there's some bug on NS that causes the face
>> > to be extended.  The expected behavior is the one we see on X and on
>> > Windows (and also on TTY frames).
>> 
>> Any idea where the code that handles this is? I took a quick look at
>> HAVE_NS, but nothing jumped out at me.
>
> I didn't see something like that, either.  But it could be the other
> way around: that NS needs some code to prevent that from happening.
>
> I think the place to look is ns_maybe_dumpglyphs_background: what is
> the width of the rectangle that it clears with the background color of
> the face?

Itʼs ns_dumpglyphs_stretch, which is doing exactly as itʼs told:
drawing the background to the right edge of the frame. Thatʼs because
in xdisp.c:display_line we have:

                      /* Make sure that a non-default face is extended
                         up to the right margin of the window.  */
                      extend_face_to_end_of_line (it);

which later causes set_glyph_string_background_width to set the
background_width of the glyph to the full width (commenting out that
call makes NS work the same as X11 for this specific case).

What I donʼt understand is that under X11 Emacs takes exactly the same
code path, yet somehow it doesnʼt end up setting the background up to
the right edge.

Robert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]