Subject: Re: bug#36858: 27.0.50; display bugs with display-fill-column-indicator-mode

From: Ergus <[email-masked]>
Date: Tue, 6 Aug 2019 01:54:05 +0200

Hi Eli:

There are two different behaviors for tui and gui in
extend_face_to_end_of_line.

In gui the face is automatically extended.  It is unclear for me what
face it is using, because this has to do with the issue that in X the
last character is extended automatically, so no loop or stretch_glyph is
needed. But it seems to be using the default face because the underline
is not extend after the text and the space for the cursor.

ON the other hand, for the tui there is

      if (it->glyph_row->ends_at_zv_p)
	it->face_id = default_face->id;
      else
	it->face_id = face->id;

which extends the face using the face of the last glyph. this extends
the underline until the end of the row; but it is different to the gui
behavior, so it is incoherent.

Whats the right behavior in the general case?

Extend the underline the whole line or fit it to the text?

If it is the second whats the right face to fill until the end of the
row

Does the same policy applies to append_space_for_newline? Because now
there is an extra underlined space after the text.

I am just waiting for your recommendation in order to submit a fix for
this issue.

Thanks in advance

Esgus.

On Fri, Aug 02, 2019 at 02:53:30PM +0300, Eli Zaretskii wrote:
>> Date: Fri, 02 Aug 2019 12:25:15 +0200
>> CC: [email-masked],Davor Rotim <[email-masked]>
>> From: Ergus <[email-masked]>
>>
>> I will give a look the next week.
>
>Thanks.
>
>> The org mode issue seems more or less easy to fix.
>>
>> But for the company-mode I need to check if there is a condition to distinguish normal text from the company
>> popups. From the display engine. Else we could consider to extend the line always until the end of the
>> screen... If that is possible...
>
>The glyph rows generated by Company should all have their ends_at_zv_p
>flag set in this use case, AFAIR.  Maybe this will help.