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#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Date: Thu, 25 Jul 2024 08:01:31 +0300 Message-ID: <861q3i6p5g.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32490"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, 71866@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 07:02: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 1sWqcM-0008KW-Cj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 07:02:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWqc7-0002qc-Ed; Thu, 25 Jul 2024 01:02: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 1sWqc1-0002q3-6m for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 01:01:57 -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 1sWqc0-0005BE-Ue for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 01:01:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWqc6-0001AL-FG for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 01:02: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: Thu, 25 Jul 2024 05:02: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.17218837174470 (code B ref 71866); Thu, 25 Jul 2024 05:02:02 +0000 Original-Received: (at 71866) by debbugs.gnu.org; 25 Jul 2024 05:01:57 +0000 Original-Received: from localhost ([127.0.0.1]:35077 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWqc1-0001A2-13 for submit@debbugs.gnu.org; Thu, 25 Jul 2024 01:01:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWqby-00019o-Rd for 71866@debbugs.gnu.org; Thu, 25 Jul 2024 01:01:55 -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 1sWqbe-00053f-Pt; Thu, 25 Jul 2024 01:01:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=FjIbQOi/GRicQqSLI4bGVBeirqC0ScIuNs/L04TEdhw=; b=V96X0IJgx8qx y9mfrLa+S9kp9DAAUM76g+ZSdmhi/QNEtzX3q957Xx/IVMv/BjoU34lNKegdJcB4k1NIrdtRT39i2 Erwps8R9V0HXOukamFVgUhEQfWx6S44bBp53aAls8ubCP1NgyJuG/FK/1UxZdy1PNubMT90PVWxrh mjKXo8K2DFA0mryrcO9MSu+HNkpKuAfdrpDwRQpjCJJ/z/68Qk7rgbfWJUH0MNmJ++vEuKqFHX0WH UZv3xU4pWFvOISxfaukBeMR1szncb4T1dKVUSvthEPndc+VYRlPwB6Mvx/Yo3dNv/cvz/MZDL7lF9 HtNAOtOi2s99kQsmtr3Mxg==; In-Reply-To: <9b9402cc-b5a2-435d-8307-f04ea0ffa69a@gutov.dev> (message from Dmitry Gutov on Wed, 24 Jul 2024 22:22:33 +0300) 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:289264 Archived-At: > 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. 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. 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".