GNU bug report logs - #38563
27.0.50; Company popup renders with newlines (?) inheriting the bg properties of the character at next line's bol

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Wed, 11 Dec 2019 01:15:02 UTC

Severity: normal

Found in version 27.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: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 38563 <at> debbugs.gnu.org
Subject: bug#38563: 27.0.50; Company popup renders with newlines (?) inheriting the bg properties of the character at next line's bol
Date: Thu, 12 Dec 2019 13:32:41 +0200
> Cc: 38563 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Wed, 11 Dec 2019 23:47:30 +0200
> 
> 1. Launch 'emacs -Q -L path/to/company -l company'.
> 2. Turn on company-mode and whitespace-mode.
> 3. In the scratch:
> newline
> newline
> space space space
> previous-line
> Type 'c', then M-x company-complete-common
> 
> Then wait ~3 seconds because of that "you can run this command ..." 
> nonsense which is implemented using sit-for. The popup will appear.
> 
> Observe how the space to the right of the popup is all yellow (the color 
> whitespace-mode assigns to the spaces on the next line by default).

Thanks.

The "character at next bol" sounds strange, since the display engine
has no look-ahead -- it never examines characters on the next line
while displaying the current line.  But it all starts making sense
when you recall that Company mode puts its overlay on that next line.
So the "inherited" face is not on the next line, it is at the position
where the Company overlay is set.  IOW, it's the "underlying face" for
the overlay string.

Should be fixed now, please test.

Btw, the bug is triggered because Company mode uses a weird '(default)
face, a list, instead of just 'default.  This is valid, but it wastes
a slot in the frame's face cache, so perhaps there's a good reason to
avoid that and simplify '(default) to 'default when you propertize the
tooltip text.




This bug report was last modified 5 years and 150 days ago.

Previous Next


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