diff --git a/src/xdisp.c b/src/xdisp.c index 0635cad0d19..2326df4300d 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -28549,7 +28549,10 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face, } if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { int c = COMPOSITION_GLYPH (s->cmp, 0); Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); @@ -28598,7 +28601,10 @@ fill_gstring_glyph_string (struct glyph_string *s, int face_id, s->cmp_from = glyph->slice.cmp.from; s->cmp_to = glyph->slice.cmp.to + 1; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28664,7 +28670,10 @@ fill_glyphless_glyph_string (struct glyph_string *s, int face_id, s->face = FACE_FROM_ID (s->f, face_id); s->font = s->face->font ? s->face->font : FRAME_FONT (s->f); if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28736,7 +28745,10 @@ fill_glyph_string (struct glyph_string *s, int face_id, s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28778,7 +28790,10 @@ fill_image_glyph_string (struct glyph_string *s) s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28801,7 +28816,10 @@ fill_xwidget_glyph_string (struct glyph_string *s) s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -28835,7 +28853,10 @@ fill_stretch_glyph_string (struct glyph_string *s, int start, int end) s->face = FACE_FROM_ID (s->f, face_id); s->font = s->face->font; if (s->hl == DRAW_MOUSE_FACE - || (s->hl == DRAW_CURSOR && cursor_in_mouse_face_p (s->w))) + || (s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p + && cursor_in_mouse_face_p (s->w))) { Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (s->f); s->face = FACE_FROM_ID_OR_NULL (s->f, hlinfo->mouse_face_face_id); @@ -29122,6 +29143,8 @@ set_glyph_string_background_width (struct glyph_string *s, int start, int last_x #ifdef HAVE_WINDOW_SYSTEM if (FRAME_WINDOW_P (s->f) && s->hl == DRAW_CURSOR + && MATRIX_ROW (s->w->current_matrix, + s->w->phys_cursor.vpos)->mouse_face_p && cursor_in_mouse_face_p (s->w)) { /* Adjust the background width of the glyph string, because