--- a/src/xdisp.c +++ b/src/xdisp.c @@ -31345,7 +31345,8 @@ A polygon is a cons (poly . [x0 y0 x1 y1 ...]) where each pair in the the one we are currently highlighting, we have to check if we enter the overlapping overlay, and then highlight only that. */ - || (OVERLAYP (hlinfo->mouse_face_overlay) + || (!hlinfo->mouse_face_hidden + && OVERLAYP (hlinfo->mouse_face_overlay) && mouse_face_overlay_overlaps (hlinfo->mouse_face_overlay))) { /* Find the highest priority overlay with a mouse-face. */