# HG changeset patch # User Gerd Moellmann # Date 991221550 0 # Node ID b64d19038fcaa36a68482fc19fe8e9f5613d5e0c # Parent e4f0e3e1c22e2ebf977350147768428b47c47f76 (note_mouse_highlight): If an overlapping overlay exists, but we find that we highlight the same overlay as before, don't do the highlighting again. diff -r e4f0e3e1c22e -r b64d19038fca src/xterm.c --- a/src/xterm.c Tue May 29 16:12:03 2001 +0000 +++ b/src/xterm.c Wed May 30 11:19:10 2001 +0000 @@ -6959,10 +6959,6 @@ || (OVERLAYP (dpyinfo->mouse_face_overlay) && mouse_face_overlay_overlaps (dpyinfo->mouse_face_overlay))) { - /* Clear the display of the old active region, if any. */ - if (clear_mouse_face (dpyinfo)) - cursor = None; - /* Find the highest priority overlay that has a mouse-face property. */ overlay = Qnil; @@ -6972,8 +6968,19 @@ if (!NILP (mouse_face)) overlay = overlay_vec[i]; } + + /* If we're actually highlighting the same overlay as + before, there's no need to do that again. */ + if (!NILP (overlay) + && EQ (overlay, dpyinfo->mouse_face_overlay)) + goto check_help_echo; + dpyinfo->mouse_face_overlay = overlay; - + + /* Clear the display of the old active region, if any. */ + if (clear_mouse_face (dpyinfo)) + cursor = None; + /* If no overlay applies, get a text property. */ if (NILP (overlay)) mouse_face = Fget_text_property (position, Qmouse_face, object); @@ -7085,6 +7092,8 @@ } } + check_help_echo: + /* Look for a `help-echo' property. */ { Lisp_Object help, overlay;