From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <8336dpaiee.fsf@gnu.org> References: <4c2a9d55-57d1-4c19-fe20-4ccf61d20d68@yandex.ru> <83o8weaiem.fsf@gnu.org> <4220b126-0511-d6ee-521d-d79f463ab6ee@yandex.ru> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194484"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38563@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 12 12:33:16 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ifMiZ-000oPh-CI for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Dec 2019 12:33:15 +0100 Original-Received: from localhost ([::1]:58038 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifMiX-0007RT-4o for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Dec 2019 06:33:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60226) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifMiN-0007R7-1x for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 06:33:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifMiL-0002QE-Uz for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 06:33:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53126) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifMiL-0002Pv-RO for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 06:33:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ifMiL-0005NM-Oc for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 06:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2019 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38563 X-GNU-PR-Package: emacs Original-Received: via spool by 38563-submit@debbugs.gnu.org id=B38563.157615037920656 (code B ref 38563); Thu, 12 Dec 2019 11:33:01 +0000 Original-Received: (at 38563) by debbugs.gnu.org; 12 Dec 2019 11:32:59 +0000 Original-Received: from localhost ([127.0.0.1]:59099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifMiJ-0005N5-3q for submit@debbugs.gnu.org; Thu, 12 Dec 2019 06:32:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifMiG-0005Ms-Uz for 38563@debbugs.gnu.org; Thu, 12 Dec 2019 06:32:57 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:35373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ifMiA-00026N-4T; Thu, 12 Dec 2019 06:32:50 -0500 Original-Received: from [176.228.60.248] (port=4335 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ifMi9-0003T1-K0; Thu, 12 Dec 2019 06:32:49 -0500 In-reply-to: <4220b126-0511-d6ee-521d-d79f463ab6ee@yandex.ru> (message from Dmitry Gutov on Wed, 11 Dec 2019 23:47:30 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173217 Archived-At: > Cc: 38563@debbugs.gnu.org > From: Dmitry Gutov > 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.