From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62573: 29.0.60; Cursor color not being inverted in emacs-29 Date: Sun, 02 Apr 2023 14:12:42 +0300 Message-ID: <83r0t2wn9x.fsf@gnu.org> References: <83edp420lx.fsf@gnu.org> <83bkk817rr.fsf@gnu.org> <83cz4myio7.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="blaine.gmane.org:116.202.254.214"; logging-data="25850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, abdo.haji.ali@gmail.com, 62573@debbugs.gnu.org To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 02 13:13:26 2023 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 1piveH-0006YN-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Apr 2023 13:13:25 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pivdw-0003hb-Me; Sun, 02 Apr 2023 07:13:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pivdv-0003hP-AG for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 07:13:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pivdu-0004nv-VI for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 07:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pivdu-0002rF-Fo for bug-gnu-emacs@gnu.org; Sun, 02 Apr 2023 07:13: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: Sun, 02 Apr 2023 11:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62573 X-GNU-PR-Package: emacs Original-Received: via spool by 62573-submit@debbugs.gnu.org id=B62573.168043395510943 (code B ref 62573); Sun, 02 Apr 2023 11:13:02 +0000 Original-Received: (at 62573) by debbugs.gnu.org; 2 Apr 2023 11:12:35 +0000 Original-Received: from localhost ([127.0.0.1]:39288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pivdT-0002qR-GP for submit@debbugs.gnu.org; Sun, 02 Apr 2023 07:12:35 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pivdP-0002q1-9E for 62573@debbugs.gnu.org; Sun, 02 Apr 2023 07:12:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pivdJ-0004n1-RK; Sun, 02 Apr 2023 07:12:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=EsHSRuwAm0fcZb6FK058AWZ4jEb7NIxQ28qr9omii9k=; b=axhV1k6Twaecz5ThAuIC ezn3ZPDdzQfVs+vnA/kQLKT6J9xuzXcfS25A1sHa8BzpWsQU+IlXHPNkL/w03kqYrSpYo6Aojh6zf Ylhn+oW8EwtPm6igXIPgQYI6ZmAIphgprS20srm8WpsnVsKOl01+Ge3SaJmrlyyc4mdtNAG/paZQ4 JiZNVHMDTKJfO5FZCMnu9Q7SpaiLbXZCUeXfIgo/JggtsC27stW2KnnrtXjJqdPWgfNorWKIJto/s PExDYLI4batu/qHCsfCWwHY8o/Y64DF6WlZbiEkhG5zpb7+hG7r47Ir5fNd+9yAhmjbiVh3k7EKoI 1RKGMW8f2zVimQ==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pivdJ-0006Bm-3o; Sun, 02 Apr 2023 07:12:25 -0400 In-Reply-To: (message from Daniel =?UTF-8?Q?Mart=C3=ADn?= on Sun, 02 Apr 2023 13:01:07 +0200) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:259105 Archived-At: > From: Daniel Martín > Cc: luangruo@yahoo.com, 62573@debbugs.gnu.org, abdo.haji.ali@gmail.com > Date: Sun, 02 Apr 2023 13:01:07 +0200 > > Eli Zaretskii writes: > > >> From: Daniel Martín > >> Cc: Al Haji-Ali , 62573@debbugs.gnu.org, > >> luangruo@yahoo.com > >> Date: Sat, 01 Apr 2023 21:56:33 +0200 > >> > >> This bug is a regression caused by > >> 07715630ad9df9cb681cbadecbaf73fc9c698061. (Adding Po Lu to the CC.) > >> > >> >From what I see, the font display refactor removed this code from > >> src/nsterm.m: > >> > >> - face = FACE_FROM_ID_OR_NULL (f, phys_cursor_glyph->face_id); > >> - if (face && NS_FACE_BACKGROUND (face) > >> - == ns_index_color (FRAME_CURSOR_COLOR (f), f)) > >> - { > >> - [ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), f) set]; > >> - hollow_color = FRAME_CURSOR_COLOR (f); > >> - } > >> - else > >> > >> which seems to be responsible for the cursor color change when the > >> background face color is the same as the cursor color. I can't find > >> that logic in the current code, so I think we miss it from the > >> refactoring. > >> > >> I've solved the bug by replicating that logic in the appropriate places, > >> nsterm.m and macfont.m: > > > > This regression should be fixed on the release branch, but the patch > > you propose is quite large. Can't we simply reinstate the removed > > code, and apply the changes you propose only on master? > > > > That's the first thing I tried, but it didn't fix the problem. More > code changes would be needed because, since > 07715630ad9df9cb681cbadecbaf73fc9c698061, the responsibility of drawing > the cursor now resides in the macOS font driver (macfont.m). OK, thanks, understood.