Mercurial > emacs
changeset 37944:b64d19038fca
(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.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 30 May 2001 11:19:10 +0000 |
parents | e4f0e3e1c22e |
children | 8f7b126354f0 |
files | src/xterm.c |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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;