From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#72230: 29.4; Cursor Disappears with Hebrew Text Date: Sun, 21 Jul 2024 20:45:32 +0200 Message-ID: References: <86o76qbvd9.fsf@gnu.org> <86ikwybuoq.fsf@gnu.org> <86a5iabq90.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11628"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Po Lu , Eli Zaretskii , hermann sorgel , 72230@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 21 20:47:19 2024 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 1sVbaZ-0002pr-6b for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 21 Jul 2024 20:47:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVbaJ-0000vn-7n; Sun, 21 Jul 2024 14:47:03 -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 1sVbaG-0000vV-T6 for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 14:47:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sVbaG-0004BY-HV for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 14:47:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sVbaI-0008IF-GQ for bug-gnu-emacs@gnu.org; Sun, 21 Jul 2024 14:47:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Jul 2024 18:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72230 X-GNU-PR-Package: emacs Original-Received: via spool by 72230-submit@debbugs.gnu.org id=B72230.172158760431852 (code B ref 72230); Sun, 21 Jul 2024 18:47:02 +0000 Original-Received: (at 72230) by debbugs.gnu.org; 21 Jul 2024 18:46:44 +0000 Original-Received: from localhost ([127.0.0.1]:56062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVbZz-0008Hg-NK for submit@debbugs.gnu.org; Sun, 21 Jul 2024 14:46:44 -0400 Original-Received: from mail-ed1-f47.google.com ([209.85.208.47]:60884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sVbZx-0008HT-Iq for 72230@debbugs.gnu.org; Sun, 21 Jul 2024 14:46:42 -0400 Original-Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5a20de39cfbso2629465a12.1 for <72230@debbugs.gnu.org>; Sun, 21 Jul 2024 11:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721587533; x=1722192333; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=J30S0VWt9/XBo2k9zFu+m7AODhkSfLOoBIFl/1GtADs=; b=Xbp07xaLdMIZcrz8hm6SRyCX8CtR2wUZlBLhHhoIlaoLlh6D4OOYYgkG1u9X8ADjBg L9qpQfJLSA2UwMJ4ZwYLrqmlefK0VRF5hdemgUHwhcU2KWa7dMk1JZvel6WaG7IFmn+O Wm8i4z5TzzRWdqcyK+p7MvSeRU1F+or/o9SJoevm0yKno0Joi6++DCgO3i+BP0bZafFB vu+wZ+TYKA+hia5evkM+yJMR7WY0TATOflvAlJDF9CnZWgRQVJ/ZlhU0+Drxp6U+YdMD e0p3kPhpjJaMp1YVf0xV7BV0OW9i/uVuVJ8GcW6RJmjVRckbFItlJT50BH5MYx5Sjrt9 +4qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721587533; x=1722192333; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=J30S0VWt9/XBo2k9zFu+m7AODhkSfLOoBIFl/1GtADs=; b=j3kkTnsqAHC1eETQmW/3OsI9AXCccWNEjrCxffeiI4LXmeVdFxS3UlDZCzEFgp1pms Rsjqp9vQX0oFnUAqryozfOFptaXMY3ghccbFZFCBU0GQ6uPFWF+olcHgE15w6eDOUAuo GnbYbmpLMGgaPWL6030YZbbNSMg4U2tvdgUu83ayR291WwEt061OFmgtiUuNRC2WGZdr VslF/AiLfCH67Of++vCRUYhj7OX2vAlymTvyVhrihmvlMELBaqmuu62VNH3E31Vt/EH6 lWuqiuvddTAoNNodrByIboU5xPcOtsU+c4/NeTwcJA72VrTuGPIA6re6CJr0Gr34PzAf uegA== X-Forwarded-Encrypted: i=1; AJvYcCXfNN//CY/a5cCBxfl1R8/yIjX49d56+3EJZbPkgago3ERR/4jy/aVL6KWt+vVHo7MGsUzd/ePxO1qKIv5usXs1IsDxyEE= X-Gm-Message-State: AOJu0Yyrzf9xg8DlcLP9yW0Cwo8rYWe9nTXn9HwLK0yA+K2iMqRwpjxT HgT9IhvkKcnS/eM986jjpW6aLFxJqNxN5spvfAYd7s2lQ0B7Fv4lnbl1ig== X-Google-Smtp-Source: AGHT+IFnQUzxpp0gKBxZBXiLXYq+enFtAbcoBED8NGNHoMHkX8qtDnEOGmzvlT/wQnmZ23EcxseXlQ== X-Received: by 2002:a05:6402:3584:b0:59c:31fd:266b with SMTP id 4fb4d7f45d1cf-5a3f08931a3mr4732705a12.28.1721587533434; Sun, 21 Jul 2024 11:45:33 -0700 (PDT) Original-Received: from pro2.fritz.box (pd9e36c76.dip0.t-ipconnect.de. [217.227.108.118]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5a30c2f88a5sm4841762a12.77.2024.07.21.11.45.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Jul 2024 11:45:33 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Sun, 21 Jul 2024 11:05:57 -0700") 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:289090 Archived-At: Stefan Kangas writes: > Eli Zaretskii writes: > >> So maybe the problem is elsewhere. One thing is almost certain: it's >> a problem specific to the macOS build of Emacs. People who can debug >> on that platform are encouraged to suggest insights and changes. > > This seems to have something to with the clipping path, and is fixed > here by the below patch. I don't think it's suitable for installing > though. > > Po Lu, since you added the below NSRectClip call, do you have any > thoughts here? > > diff --git a/src/nsterm.m b/src/nsterm.m > index 794630de1c1..54b15bc851d 100644 > --- a/src/nsterm.m > +++ b/src/nsterm.m > @@ -3102,7 +3102,7 @@ Note that CURSOR_WIDTH is meaningful only for > (h)bar cursors. > #ifdef NS_IMPL_GNUSTEP > GSRectClipList (ctx, &r, 1); > #else > - NSRectClip (r); > + // NSRectClip (r); > #endif > > [FRAME_CURSOR_COLOR (f) set]; > @@ -3135,7 +3135,7 @@ Note that CURSOR_WIDTH is meaningful only for > (h)bar cursors. > on the right of its glyph, rather than on the left. */ > cursor_glyph = get_phys_cursor_glyph (w); > if ((cursor_glyph->resolved_level & 1) != 0) > - s.origin.x += cursor_glyph->pixel_width - s.size.width; > + s.origin.x += cursor_glyph->pixel_width - cursor_width; > > NSRectFill (s); > [ctx restoreGraphicsState]; Erm, once is enough :-) 1 file changed, 4 insertions(+) src/nsterm.m | 4 ++++ modified src/nsterm.m @@ -3137,6 +3137,10 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors. if ((cursor_glyph->resolved_level & 1) != 0) s.origin.x += cursor_glyph->pixel_width - s.size.width; + /* Get rid of the clipping set previously. */ + [ctx restoreGraphicsState]; + [ctx saveGraphicsState]; + NSRectClip (s); NSRectFill (s); [ctx restoreGraphicsState]; break;