From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#4911: mouse-face property should merge face attributes, not replace Date: Fri, 08 May 2020 17:39:22 +0300 Message-ID: <83a72iij8l.fsf@gnu.org> References: <8452d0c8-afc3-bdb8-2c88-f66dc770c3c4@gmail.com> <0955d0dd-c4fe-4feb-b68b-0ed212ccf291@default> <35268628-9ef1-8dd2-ab93-05ca1cae06be@gmail.com> <83blne74mk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="74610"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 4911@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 08 16:40:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jX4Ab-000JGJ-LT for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 16:40:09 +0200 Original-Received: from localhost ([::1]:39216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX4Aa-0001H1-N8 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 May 2020 10:40:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jX4AU-0001Gr-Pe for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 10:40:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34504) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jX4AU-0007xf-GA for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 10:40:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jX4AU-0003TO-Dt for bug-gnu-emacs@gnu.org; Fri, 08 May 2020 10:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 May 2020 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 4911 X-GNU-PR-Package: emacs Original-Received: via spool by 4911-submit@debbugs.gnu.org id=B4911.158894878413316 (code B ref 4911); Fri, 08 May 2020 14:40:02 +0000 Original-Received: (at 4911) by debbugs.gnu.org; 8 May 2020 14:39:44 +0000 Original-Received: from localhost ([127.0.0.1]:46050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX4AB-0003Si-RY for submit@debbugs.gnu.org; Fri, 08 May 2020 10:39:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jX4A9-0003SS-Hh for 4911@debbugs.gnu.org; Fri, 08 May 2020 10:39:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58674) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jX4A4-0007i0-6e; Fri, 08 May 2020 10:39:36 -0400 Original-Received: from [176.228.60.248] (port=2339 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jX4A3-00049x-9X; Fri, 08 May 2020 10:39:35 -0400 In-Reply-To: (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit-Claudel on Mon, 4 May 2020 11:16:05 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:179924 Archived-At: > Cc: drew.adams@oracle.com, 4911@debbugs.gnu.org, larsi@gnus.org > From: Clément Pit-Claudel > Date: Mon, 4 May 2020 11:16:05 -0400 > > Currently we cache a single realized mouse_face. Could we cache a sequence of such realized faces instead, attached to regions of text? That is, we'd compute the realized mouse-face for all regions of the current span, and cache that. Concretely, I guess this would mean enhancing Mouse_HLInfo to keep a list of spans instead of a single one. I'm not sure I understand what you mean by "span" in general and "current span" in particular. We could, of course, realize such combinations. It would need: . realizing and caching 2 faces whenever we render some text which has a mouse-face property; . recording the buffer positions to which those realized mouse-faces are relevant; and . using the corresponding face when redrawing the highlighted portions of text by looking at the positions of each of the affected glyphs (which might be complicated if the text doesn't come from a buffer)