From: oldosfan Date: Thu, 14 Oct 2021 03:05:00 +0000 (+0800) Subject: Fix mouse face in NS port X-Git-Tag: emacs-29.0.90~3671^2~28 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=278e4fc9c6353068334dd39d45334b1df82a6cee;p=emacs.git Fix mouse face in NS port * src/nsterm.m (ns_draw_glyph_string): Set s->face to the mouse face. --- diff --git a/src/nsterm.m b/src/nsterm.m index ed0e7a2aae8..3727f861ac6 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3976,6 +3976,19 @@ ns_draw_glyph_string (struct glyph_string *s) NSRect r[2]; int n; char box_drawn_p = 0; + + struct face *face = s->face; + if (s->hl == DRAW_MOUSE_FACE) + { + face + = FACE_FROM_ID_OR_NULL (s->f, + MOUSE_HL_INFO (s->f)->mouse_face_face_id); + if (!face) + face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); + } + + s->face = face; + struct font *font = s->face->font; if (! font) font = FRAME_FONT (s->f);