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


View this message in rfc822 format

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: bug#27427: 26.0.50; Native line numbers lead to display error in company-mode popup
Date: Thu, 22 Jun 2017 01:41:15 +0300
On 6/21/17 9:15 PM, Eli Zaretskii wrote:
> Or do you just assume the column there is
> zero?

Yep! And there are zero outstanding bug reports related to this.

> 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.

I'm saying it's not easy, and I'm not brimming with ideas.

Can't we put native line numbering outside of the window bounds? Like 
linum and nlinum do.

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

Event handing and theming issues (at least with GUI frames).

- GUI menus have only two colors: background and foreground (and maybe 
"inactive"). Not sure about the terminal mode menus.

- Menus take over the event loop. IIRC you suggested a way to get around 
this, but that doesn't solve the previous problem anyway.

IIUC we've settled on using chromeless frames for the popup. It seems 
Martin is cooking something in this direction (almost ready?), but I 
haven't tried using them. And that would take some work.

Last I checked, Clément was interested, but no results yet.

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

Consider me seduced. I'm seeing the same behavior as what Alexander 
reported. There are two problems:

1. The first visual line containing the popup has the line number at its 
beginning. And as such, the popup line is shifted to the right.

2. The rest don't have the line numbers before them, so they are 
positioned correctly. This may or may not be considered a problem 
(there's probably nothing we can do about the lack of numbers), but the 
inconsistency between the different popup lines seems like it would 
require some special handling in the code.

And whatever that additional code would do, it would have to be 
reconciled with line-prefix as well, so as not to make things worse.




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

Previous Next


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