]> git.eshelyaron.com Git - emacs.git/commit
Fix minor issues with text display when cursor is in mouse face
authorPo Lu <luangruo@yahoo.com>
Thu, 14 Oct 2021 10:38:26 +0000 (18:38 +0800)
committerEli Zaretskii <eliz@gnu.org>
Sun, 17 Oct 2021 11:46:55 +0000 (14:46 +0300)
commit2028df7826bb2c2909b2aaeba47282ca70c514e3
tree3927400069c36a3825feadeabd33d82e20c87a0b
parent5a5651a2f927b7758dfdf36953073f1f1a9920f9
Fix minor issues with text display when cursor is in mouse face

 * src/xdisp.c (get_cursor_offset_for_mouse_face): Don't calculate
offsets for the glyph the cursor is on, and move some logic to
get_glyph_pixel_width_delta_for_mouse_face.
(fill_composite_glyph_string)
(fill_gstring_glyph_string)
(fill_glyphless_glyph_string)
(fill_glyph_string)
(fill_image_glyph_string)
(fill_xwidget_glyph_string)
(fill_stretch_glyph_string): Set s->face to mouse face whenever
appropriate.
(get_glyph_pixel_width_delta_for_mouse_face): New function.
(set_glyph_string_background_width): Update background width and
s->width to take into account differing :box properties of the mouse
face, when producing strings for the cursor.
(erase_phys_cursor): Redraw mouse face when erasing a cursor on top of
the mouse face.
 * src/xterm.c (x_set_mouse_face_gc): Stop setting s->face when under
mouse face because redisplay now does that for us.
 * src/w32term.c (w32_set_mouse_face_gc): Likewise.
src/w32term.c
src/xdisp.c
src/xterm.c