[Top][All Lists]

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

Re: Identifying the face between STRETCH and right fringe.

From: Eli Zaretskii
Subject: Re: Identifying the face between STRETCH and right fringe.
Date: Tue, 27 Nov 2018 11:34:50 +0200

> From: Robert Pluim <address@hidden>
> Cc: address@hidden
> Date: Tue, 27 Nov 2018 09:56:36 +0100
> 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.

On a GUI frame, extend_face_to_end_of_line is supposed to return
almost immediately, here:

  if (FRAME_WINDOW_P (f)
      && MATRIX_ROW_DISPLAYS_TEXT_P (it->glyph_row)
      && face->box == FACE_NO_BOX
      && face->background == FRAME_BACKGROUND_PIXEL (f)
      && !face->stipple
      && !it->glyph_row->reversed_p)
    return;      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

The exceptions are:

  (a) when we break a line in the middle of a face whose background is
      different from the default face, or
  (b) when the default face has the box or the stipple attribute set, or
  (b) if the screen line is displayed right-to-left

And none of those should be the case here.

So the question becomes: why doesn't NS reset it->face to the default
face, like it's supposed to?  We are already done with displaying the
stretch glyph, so its face should be bygone.

Let me know if you need guidance for where to look for the answers.


reply via email to

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