]> git.eshelyaron.com Git - emacs.git/commit
Make sure mouse face doesn't stay on the cursor after it is cleared
authorPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 06:53:57 +0000 (14:53 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 5 Jan 2022 06:53:57 +0000 (14:53 +0800)
commite1626257ab984c129aaeb8de6a1e4ec5ef1d2e13
treefa06b5f348bd707f45325b7194ff5a39ed4c04a9
parent8875ae70a435358824e7f39b0c769c459e6a067e
Make sure mouse face doesn't stay on the cursor after it is cleared

cursor_in_mouse_face_p will still return true when the phys
cursor is drawn inside show_mouse_face when called by
clear_mouse_face, since that drawing happens before
hlinfo->mouse_face_window can be set to nil.

However, the row's mouse_face_p will be adjusted before the
cursor is drawn in show_mouse_face, so it can be used to
determine if the cursor is actually under mouse face.

* src/xdisp.c (fill_composite_glyph_string):
(fill_gstring_glyph_string):
(fill_glyphless_glyph_string):
(fill_glyph_string):
(fill_xwidget_glyph_string):
(fill_stretch_glyph_string): Only apply mouse face when
DRAW_CURSOR if the row is also mouse_face_p.

(set_glyph_string_background_width): Only adjust width if the
row holding the cursor is also mouse_face_p.
src/xdisp.c