From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov 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 00:13:37 +0200 Message-ID: <2203b03e-5558-1fe1-788a-4006602626f2@yandex.ru> References: <4c2a9d55-57d1-4c19-fe20-4ccf61d20d68@yandex.ru> <83o8weaiem.fsf@gnu.org> <4220b126-0511-d6ee-521d-d79f463ab6ee@yandex.ru> <8336dpaiee.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="252254"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 Cc: 38563@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 12 23:14:12 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 1ifWip-0013VZ-PC for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Dec 2019 23:14:11 +0100 Original-Received: from localhost ([::1]:37746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifWin-0004IB-Vc for geb-bug-gnu-emacs@m.gmane.org; Thu, 12 Dec 2019 17:14:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41638) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifWih-0004Hz-Ij for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 17:14:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifWig-0004AJ-HU for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 17:14:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55025) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ifWig-00049m-CR for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 17:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ifWig-0001g8-7M for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2019 17:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2019 22:14:02 +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.15761888296426 (code B ref 38563); Thu, 12 Dec 2019 22:14:02 +0000 Original-Received: (at 38563) by debbugs.gnu.org; 12 Dec 2019 22:13:49 +0000 Original-Received: from localhost ([127.0.0.1]:60998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifWiT-0001fZ-1k for submit@debbugs.gnu.org; Thu, 12 Dec 2019 17:13:49 -0500 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:52862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ifWiQ-0001fM-Be for 38563@debbugs.gnu.org; Thu, 12 Dec 2019 17:13:47 -0500 Original-Received: by mail-wm1-f43.google.com with SMTP id p9so4105695wmc.2 for <38563@debbugs.gnu.org>; Thu, 12 Dec 2019 14:13:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=u6Tf5fkhCkQK+BRwsTA4Wja6yrSDRBiuLMbk1FWpXxA=; b=nkaebR894Q/IIykoRLzOga5gE+EBkb2fIyrmFCpbV9U/7SM98jj0vdjMue92p3w0rH s+h2IfxWpq4zvJZcUY9zOUNKa9Z9e4ik0ZW9StYD61gJyA14hGo/dXCnMezkRRvkloEW jMGZy63eKcubS87lM6+G37B1QjnlmOjhKzMkeHqEZ1e5fBOFCPgZHSVGS8pOfGl42ldq DGedVdvryOfTefEmbRCUYtX7hZj9kF2Bjuq7h5Jk0EEnlbJWxmRcjOMtHTsdrreWvM/A ByNMyr+hE93KhStnn0tvqKbZsqOnETWAyST+bd4zgQLcxbx7uGyQNSWS64txMIv0rGsJ 6nBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=u6Tf5fkhCkQK+BRwsTA4Wja6yrSDRBiuLMbk1FWpXxA=; b=L8UNn3zTlpjw6RN56oG1uN0nVAOFCXNgK5YKkh5Wfq3PvF1TP3FpOy1xOx7vOllpIo 9cNLgBtN2KpHk+lImOALBUBKo8pbmn6LBELsCbj+az3I/L7nMbviYi8M5RcsXV+quRjw ZIaIjMDTFV5gFk8itF80Gy6Dhi3MHBSfHKhQWm4X2L5ExaVwZsQkjxP0uEbsoW6uz0to S5bkXPwUUArQxCX1r3UDl8ILAcxtRB4NXP5nzGWSeKr88MHpkq/qaV6J8N/L5BBFgIXd ssQJvdrekZmmexi/0x1nWzy2TfrHMgr1tjLYiOWqNWkH7yHtvZqNg0oPrctzyl2OewFu Te3Q== X-Gm-Message-State: APjAAAWiBweIjfrrwJ7ExkSiz3zyldOr6BD6RJSkkCDU34NT2ITfls5D QOS9jrj8XDzFqb193GYAbL3L567z X-Google-Smtp-Source: APXvYqzEEOYcOJWKcE6pXXmv+nVpM/cD6ANvkA3P8SY93stPMD6T0w2RoAOKOaR+2L2FqAk85Wzj7g== X-Received: by 2002:a05:600c:2c44:: with SMTP id r4mr8882880wmg.140.1576188820022; Thu, 12 Dec 2019 14:13:40 -0800 (PST) Original-Received: from [192.168.0.5] ([212.50.117.215]) by smtp.googlemail.com with ESMTPSA id f1sm7514623wru.6.2019.12.12.14.13.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2019 14:13:39 -0800 (PST) In-Reply-To: <8336dpaiee.fsf@gnu.org> Content-Language: en-US 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:173228 Archived-At: On 12.12.2019 13:32, Eli Zaretskii wrote: > 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. Yeah, OK. Now that you mentioned the 'default' face, I remembered: it's used there exactly so that we don't inherit the background from the "underlying face". > Should be fixed now, please test. It looks fixed in the whitespace-mode example, but not in the other one. Just call M-x company-complete-common on the "Author:" line in a LogEdit buffer to reproduce. (I've tested common d7efe98951). By the way, I kind of wonder why the fix added more lines than it deleted. Before, this feature just worked. Was that simply by accident? Or were the changes brought in by :extend major enough? > 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. Ultimately, the reason it's there like that is because font-lock-append-text-property coerces all values to lists. We could change that and maybe save some memory in the process. It would be an (minor) incompatible change, however.