Subject: Re: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Jun 2017 21:15:37 +0300

> Cc: [email-masked], [email-masked]
> From: Dmitry Gutov <[email-masked]>
> Date: Wed, 21 Jun 2017 16:04:58 +0300
> 
> On 6/21/17 5:40 AM, Eli Zaretskii wrote:
> 
> >> When the position at bol is interpreted as "column 3", all lines of the
> >> rectangle are rendered starting with the fourth character of each line.
> > 
> > So this is the root cause of the problem.  Is there a reason not to
> > start rendering from the character whose posn-col-row is 3?
> 
> How?
> 
> Does that mean I'll have to call posn-at-point twice now? Once for 
> point, and once for beginning-of-visual-line?

I guess so.  I understand that now you call current-column or
something similar at BOL?  Or do you just assume the column there is
zero?

> Even that won't solve all the rendering issues. In my testing, the first 
> line of the popup is not at the same column as the rest of them. 
> Probably because of the `line-prefix' property on the overlay which I 
> explained in the previous email. And we can't stop putting it there 
> because we don't have a better solution for the `line-prefix' text property.

What I had in mind is to come up with a solution that will work the
same with line-prefix specified in any way we support.  Then you won't
need to put the line-prefix property on the company overlay.

Btw, can you remind me why we don't use pop-up menus for company
popups?

> Even so, I'm not sure this will be the end of it. Setting line-prefix 
> doesn't seem to be an accurate model of the problem company popup has 
> with native line numbering:

Could be.  Can I seduce you to try the line-numbers branch? ;-)