Subject: Re: bug#50660: 28.0.50; Text artifacting when the cursor moves over text under mouse face that originally displayed a box

From: Po Lu <[email-masked]>
Date: Sun, 26 Sep 2021 17:56:03 +0800

Eli Zaretskii <[email-masked]> writes:

> I don't think I understand the situation well enough to answer these
> questions.

Thanks, I'll try to explain.

> First, which call to display_and_set_cursor are we talking about?

The call inside show_mouse_face.

> And what do you mean by "erase_phys_cursor gets very confused" --
> confused how?

It calls draw_phys_cursor_glyph, which draws the glyph at the original X
position, and not the position with the mouse face offset applied.

What I was asking is whether or not it's okay to not restore
phys_cursor->x to its original value after the call to
display_and_set_cursor inside show_mouse_face, or if I should also
calculate and add the offset in erase_phys_cursor (if
cursor_in_mouse_face_p) instead.

TIA.