From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Thu, 25 Jul 2024 19:14:09 +0300 Message-ID: References: <86o76sea9d.fsf@gnu.org> <72a0b2e2-600e-46f1-b583-0bed86f27d2d@gutov.dev> <86o76scaou.fsf@gnu.org> <86cyn7cito.fsf@gnu.org> <1659357b-5ca0-47a6-8ff3-4aa26017280b@gutov.dev> <86ttgibxqv.fsf@gnu.org> <7ae61592-8319-4b1a-b973-4015ff1db569@gutov.dev> <86wmlda3jb.fsf@gnu.org> <86a5i89wzm.fsf@gnu.org> <6f097f2d-29fd-4f2d-8482-569a970f5954@gutov.dev> <861q3j81py.fsf@gnu.org> <62f73017-60e4-486a-8a34-fa8339c0307c@gutov.dev> <86frry7nya.fsf@gnu.org> <9b9402cc-b5a2-435d-8307-f04ea0ffa69a@gutov.dev> <861q3i6p5g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18821"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: alan@idiocy.org, 71866@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 18:15:13 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 1sX17Y-0004iD-6I for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 18:15:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sX17J-0002Kv-0R; Thu, 25 Jul 2024 12:14:57 -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 1sX17H-0002Km-1Y for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:14:55 -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 1sX17G-0001WF-Or for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:14:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sX17O-0000FN-4O for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 12:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 16:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71866 X-GNU-PR-Package: emacs Original-Received: via spool by 71866-submit@debbugs.gnu.org id=B71866.1721924071863 (code B ref 71866); Thu, 25 Jul 2024 16:15:02 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 25 Jul 2024 16:14:31 +0000 Original-Received: from localhost ([127.0.0.1]:37666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX16s-0000Dr-F8 for submit@debbugs.gnu.org; Thu, 25 Jul 2024 12:14:31 -0400 Original-Received: from fout1-smtp.messagingengine.com ([103.168.172.144]:51453) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sX16q-0000Dd-8O for 71866@debbugs.gnu.org; Thu, 25 Jul 2024 12:14:29 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 6B23E13802AF; Thu, 25 Jul 2024 12:14:15 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 25 Jul 2024 12:14:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1721924055; x=1722010455; bh=Vsc7OpZ8qXzV1WkRMAtIppBPV8nOadeSSOVpag+ia8U=; b= lvbES+N+PGkj5VmtGXwW+KPM7B6G/zGSp7HuMnaUvqVIoIpY78P3Rl66g9R+7Bhy /vdtO5WLvV8t95WyQc5efae3ItFUYhhGQn6hL5KtUYucfAB0wz2tb6vuEG4TVG67 2q9MnRvTbAWL79966wTRCDeKXNGxUXr7DjX/yWEDJ0buDUORRWSi5DAD7BEw1kEh js6I/7GlBJysKTbf7Y98DpGjjZy40pTRkcTWxT6VrcRUCcmjrqYxe5qBzwtjp7U2 eYQuXSRc7u4m0iDe5yby5n58LA4yaUjb+XX/3R5v/Si1xeA5hlNRxpBAAQxB7Z2J brYJZ2swAD0N2lQeecCvRQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1721924055; x= 1722010455; bh=Vsc7OpZ8qXzV1WkRMAtIppBPV8nOadeSSOVpag+ia8U=; b=d hUNPVXpGc7yzJbecWsWcjNO6DLKrHWcRCfu4XoEVAG3xggO5AVHjFobn38ge4wBR o48DdQK2S8m9qGVRAME2HgOK4hV8IP1yDjwmTELvjnbwUgSwoqrOiU4vLZN356hU /yQpnFLltvhtRdtUiAYzbxA6Rzkk7JWmby5iIr4QpbQ44NOv/dWg4xl+F806k0AZ wfjS57Tyas7qZH1YestMcnW0liEogz+opAQ5cAJINwSO2CmPu84W9YuycKzwTxOk pO8juZZ0aQih5GYst2gnNl7UKaJpHlQhLu7N3g3VRpE0gBZH1Tla77WMTwaYGuF+ kTrvHML47fvvKRkyqaMvg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrieefgdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeejfeefteeuueduudffheegteevfeegkeeljeefvdejfffhieefteeufeefgedt geenucffohhmrghinheprghpphhlvgdrtghomhenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgs pghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jul 2024 12:14:11 -0400 (EDT) Content-Language: en-US In-Reply-To: <861q3i6p5g.fsf@gnu.org> 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:289318 Archived-At: On 25/07/2024 08:01, Eli Zaretskii wrote: >> Date: Wed, 24 Jul 2024 22:22:33 +0300 >> Cc: alan@idiocy.org, 71866@debbugs.gnu.org >> From: Dmitry Gutov >> >>> Curiouser and curiouser. And when you say that 's' is a character >>> that is blanked, does it mean that if you have several such >>> characters, then moving the cursor to any of them will show the >>> problem? >> >> Yes: with buffer contents 'asdasdasdasd' (or any small variations of >> that), only the 's' chars exhibit the problem with the repro script. >> >> With my custom init, all of the chars exhibit the problem. >> >>> I don't understand even in principle how a display problem could be >>> specific to some characters, unless it's something related very >>> strongly to the font that is being used. So what happens in a session >>> in which 's' is a problematic character if you put a face property on >>> 's' that forces Emacs to use a different font? >> >> I tried something different: enabled variable-pitch-mode. >> >> * With the small repro script in the first message, the problem is gone. >> >> * With my custom init, the problem remains for all chars. *shrug* > > OK, so it isn't the font. I guess not. > The only other explanation is some kind of display-related caching, > somewhere. One of those is in Emacs: when we decide to redraw some > part of a window, we compute the minimum set of changes that need to > be done on the glass, trying to avoid redrawing what is already there. > Look at dispnew.c:update_text_area -- can you modify its code so that > it always draws the entire screen line? That is, make the first if > clause: > > /* If rows are at different X or Y, or rows have different height, > or the current row is marked invalid, write the entire line. */ > if (!current_row->enabled_p > || desired_row->y != current_row->y > || desired_row->ascent != current_row->ascent > || desired_row->phys_ascent != current_row->phys_ascent > || desired_row->phys_height != current_row->phys_height > || desired_row->visible_height != current_row->visible_height > || current_row->overlapped_p > /* This next line is necessary for correctly redrawing > mouse-face areas after scrolling and other operations. > However, it causes excessive flickering when mouse is moved > across the mode line. Luckily, turning it off for the mode > line doesn't seem to hurt anything. -- cyd. > But it is still needed for the header line. -- kfs. > The header line vpos is 1 if a tab line is enabled. (18th > Apr 2022) */ > || (current_row->mouse_face_p > && !(current_row->mode_line_p > && (vpos > (w->current_matrix->tab_line_p > && w->current_matrix->header_line_p)))) > || current_row->x != desired_row->x) > > always yield true. Then see if the problem goes away. > > Another redisplay optimization of the same kind is in function > scrolling_window, also in dispnew.c. I don't think it is being used > in this scenario, but to be sure, change the code in its caller > update_window, so that the condition for its call, viz.: > > /* Try reusing part of the display by copying. */ > if (row < end && !desired_matrix->no_scrolling_p) > > is always false. > > I don't think these optimizations are relevant to the situations you > describe, but just in case I'm missing something, please try disabling > them both and see if anything changes. Alas, no change. Tried just the first (changing the condition to "true || ..."), the two together (the second changed to just "false" as well), and also combined with commenting out both redisplay calls in nsterm.m. > If disabling those optimizations doesn't help, the only other > hypothesis I can come with is some display wizardry done by your video > driver, whereby it attempts to "optimize" redisplay by redrawing only > parts of the screen. If your video driver has some customization > features you can control, and if some of those customizations are > named "SOME optimization" or "fast SOMETHING" or anything else to that > effect, try disabling those "optimizations". I don't know macOS very well, but it seems like it doesn't have any options like "Disable video acceleration" one would find in other OSes: https://discussions.apple.com/thread/253590597?sortBy=rank