GNU bug report logs - #27427
26.0.50; Native line numbers lead to display error in company-mode popup

Previous Next

Package: emacs;

Reported by: Alexander Miller <alexanderm <at> web.de>

Date: Mon, 19 Jun 2017 16:51:02 UTC

Severity: normal

Found in version 26.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 27427 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: alexanderm <at> web.de, 27427 <at> debbugs.gnu.org
Subject: Re: bug#27427: 26.0.50; Native line numbers lead to display error in
 company-mode popup
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?

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.

I _guess_ I could reorganize the code and track whether the current line 
is the first, and render that line of the popup with a different 
offset... Doesn't sound great, to be honest. That's an extra piece of 
complexity.

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:

- The image in the report shows the first line of the popup being 
"rendered" at a higher column than the rest. The rest are basically 
positioned fine.

- In my testing, with (setq line-prefix "..."), it's the opposite. The 
first line of the popup is positioned correctly, while the rest are 
shifted to the right by 3 columns.




This bug report was last modified 7 years and 314 days ago.

Previous Next


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