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: Fri, 13 Dec 2019 16:12:02 +0200 Message-ID: <83wob071sd.fsf@gnu.org> References: <4c2a9d55-57d1-4c19-fe20-4ccf61d20d68@yandex.ru> <83o8weaiem.fsf@gnu.org> <4220b126-0511-d6ee-521d-d79f463ab6ee@yandex.ru> <8336dpaiee.fsf@gnu.org> <2203b03e-5558-1fe1-788a-4006602626f2@yandex.ru> <83h8248wio.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="121996"; 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 Fri Dec 13 15:13:11 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 1iflgs-000VYr-0d for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2019 15:13:10 +0100 Original-Received: from localhost ([::1]:49720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iflgq-0005st-TO for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Dec 2019 09:13:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59014) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iflgl-0005qx-DE for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2019 09:13:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iflgk-0001dl-8p for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2019 09:13:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iflgk-0001dU-4T for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2019 09:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iflgk-00072a-0s for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2019 09:13:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2019 14:13: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.157624633526952 (code B ref 38563); Fri, 13 Dec 2019 14:13:01 +0000 Original-Received: (at 38563) by debbugs.gnu.org; 13 Dec 2019 14:12:15 +0000 Original-Received: from localhost ([127.0.0.1]:33260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iflfy-00070b-OD for submit@debbugs.gnu.org; Fri, 13 Dec 2019 09:12:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:40689) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iflfx-00070I-K9 for 38563@debbugs.gnu.org; Fri, 13 Dec 2019 09:12:14 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iflfs-00009K-H6; Fri, 13 Dec 2019 09:12:08 -0500 Original-Received: from [176.228.60.248] (port=2740 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iflfr-0006AX-W3; Fri, 13 Dec 2019 09:12:08 -0500 In-reply-to: (message from Dmitry Gutov on Fri, 13 Dec 2019 12:17:06 +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:173277 Archived-At: > Cc: 38563@debbugs.gnu.org > From: Dmitry Gutov > Date: Fri, 13 Dec 2019 12:17:06 +0200 > > > That's not a bug: the face on that thin line on whose first character > > you put the tooltip overlay has a non-nil :extend attribute, so > > Company will have to explicitly say ':extend nil' in its face(s) to > > countermand that. Recall that a string from a display property merges > > into its face all the attributes from the "underlying" face, so with > > the current :extend machinery it is no longer enough just to specify a > > background color in the display string's face, as you did before. > > I see. But isn't the issue that the background from the underlying face > is used at all, rather that it's extended? Yes and no. See below. > But I suppose I could add a face with ':extend nil' and use it in place > of 'default' there. It wouldn't have worked, because ':extend nil' means the face which says this is ineligible for face merging when face extension is considered. IOW, ':extend nil' cannot countermand some other face that's being merged which says ':extend t'. > > Previously, whether a face's background was extended to EOL was > > determined only by the background color of the newline; now the > > :extend attribute determines that independently of the background > > color. > > ...but the background color is taken specifically from the face that > specified :extend? The problem is that the company's tooltip faces don't say ':extend t', so they are ineligible for merging when the face beyond EOL is considered. The only face which was eligible was the face of the first character of the line where you place your overlay. Even if it doesn't have ':extend t', we treat the base face (the first one being merged) specially: we always treat it as eligible (ever wondered how come 'default', 'tool-bar', and other "basic" faces get extended although they don't specify :extend?). The latest changes simply reset the :extend attribute of the "basic" face used in the merge process, since I believe this is expected in all the use cases (fingers crossed that no one comes with a valid use case where it's not TRT).