diff options
| author | oldosfan | 2021-10-14 11:05:00 +0800 |
|---|---|---|
| committer | Po Lu | 2021-11-10 13:27:01 +0800 |
| commit | 278e4fc9c6353068334dd39d45334b1df82a6cee (patch) | |
| tree | e2362753f0c0b9b1433fd535d162784922fbdef2 /src | |
| parent | 057fd1ee9bf6dd135039faaed22bfc5edcd16c72 (diff) | |
| download | emacs-278e4fc9c6353068334dd39d45334b1df82a6cee.tar.gz emacs-278e4fc9c6353068334dd39d45334b1df82a6cee.zip | |
Fix mouse face in NS port
* src/nsterm.m (ns_draw_glyph_string): Set s->face to the mouse face.
Diffstat (limited to 'src')
| -rw-r--r-- | src/nsterm.m | 13 |
1 files changed, 13 insertions, 0 deletions
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) | |||
| 3976 | NSRect r[2]; | 3976 | NSRect r[2]; |
| 3977 | int n; | 3977 | int n; |
| 3978 | char box_drawn_p = 0; | 3978 | char box_drawn_p = 0; |
| 3979 | |||
| 3980 | struct face *face = s->face; | ||
| 3981 | if (s->hl == DRAW_MOUSE_FACE) | ||
| 3982 | { | ||
| 3983 | face | ||
| 3984 | = FACE_FROM_ID_OR_NULL (s->f, | ||
| 3985 | MOUSE_HL_INFO (s->f)->mouse_face_face_id); | ||
| 3986 | if (!face) | ||
| 3987 | face = FACE_FROM_ID (s->f, MOUSE_FACE_ID); | ||
| 3988 | } | ||
| 3989 | |||
| 3990 | s->face = face; | ||
| 3991 | |||
| 3979 | struct font *font = s->face->font; | 3992 | struct font *font = s->face->font; |
| 3980 | if (! font) font = FRAME_FONT (s->f); | 3993 | if (! font) font = FRAME_FONT (s->f); |
| 3981 | 3994 | ||