From: Dmitry Gutov <dmitry@gutov.dev>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alan@idiocy.org, 71866@debbugs.gnu.org
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 [thread overview]
Message-ID: <c723b852-6ec2-4429-a798-70b10f5faf4c@gutov.dev> (raw)
In-Reply-To: <861q3i6p5g.fsf@gnu.org>
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 <dmitry@gutov.dev>
>>
>>> 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
next prev parent reply other threads:[~2024-07-25 16:14 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 3:14 bug#71866: 30.0.50; [macOS] Cursor hiding char behind it with certain theme customization Dmitry Gutov
2024-07-01 11:36 ` Eli Zaretskii
2024-07-02 1:07 ` Dmitry Gutov
2024-07-06 8:56 ` Eli Zaretskii
2024-07-09 2:37 ` Dmitry Gutov
2024-07-09 11:31 ` Eli Zaretskii
2024-07-10 2:46 ` Dmitry Gutov
2024-07-10 11:58 ` Eli Zaretskii
2024-07-19 1:57 ` Dmitry Gutov
2024-07-20 8:30 ` Eli Zaretskii
2024-07-20 15:46 ` Dmitry Gutov
2024-07-20 16:03 ` Eli Zaretskii
2024-07-21 0:53 ` Dmitry Gutov
2024-07-21 7:20 ` Eli Zaretskii
2024-07-21 9:04 ` Eli Zaretskii
2024-07-21 23:22 ` Dmitry Gutov
2024-07-21 13:50 ` Dmitry Gutov
2024-07-21 14:55 ` Eli Zaretskii
2024-07-21 23:58 ` Dmitry Gutov
2024-07-22 14:45 ` Eli Zaretskii
2024-07-22 15:27 ` Alan Third
2024-07-22 16:02 ` Alan Third
2024-07-23 1:11 ` Dmitry Gutov
2024-07-23 11:19 ` Eli Zaretskii
2024-07-24 0:48 ` Dmitry Gutov
2024-07-24 11:32 ` Eli Zaretskii
2024-07-24 14:34 ` Dmitry Gutov
2024-07-24 16:29 ` Eli Zaretskii
2024-07-24 19:22 ` Dmitry Gutov
2024-07-24 20:08 ` Dmitry Gutov
2024-07-25 5:01 ` Eli Zaretskii
2024-07-25 16:14 ` Dmitry Gutov [this message]
2024-07-22 16:10 ` Eli Zaretskii
2024-07-22 19:02 ` Alan Third
2024-07-22 19:15 ` Eli Zaretskii
2024-07-22 19:47 ` Alan Third
2024-07-23 1:06 ` Dmitry Gutov
2024-07-23 11:17 ` Eli Zaretskii
2024-07-02 23:42 ` Stefan Kangas
2024-07-07 2:03 ` Dmitry Gutov
2024-07-09 18:22 ` Stefan Kangas
2024-07-10 2:56 ` Dmitry Gutov
2024-07-23 7:40 ` Gerd Möllmann
2024-07-24 0:56 ` Dmitry Gutov
2024-07-24 3:48 ` Gerd Möllmann
2024-07-24 19:16 ` Dmitry Gutov
2024-07-25 3:03 ` Gerd Möllmann
2024-07-25 5:39 ` Eli Zaretskii
2024-07-25 5:58 ` Gerd Möllmann
2024-07-25 14:46 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c723b852-6ec2-4429-a798-70b10f5faf4c@gutov.dev \
--to=dmitry@gutov.dev \
--cc=71866@debbugs.gnu.org \
--cc=alan@idiocy.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.