mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-19 10:22:27 +00:00
(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.
This commit is contained in:
parent
00f5189042
commit
8bd189fb2f
@ -1,3 +1,9 @@
|
||||
2001-05-30 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* xterm.c (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.
|
||||
|
||||
2001-05-29 Gerd Moellmann <gerd@gnu.org>
|
||||
|
||||
* xmenu.c (single_submenu, xmenu_show) [!HAVE_MULTILINGUAL_MENU]:
|
||||
|
19
src/xterm.c
19
src/xterm.c
@ -6959,10 +6959,6 @@ note_mouse_highlight (f, x, y)
|
||||
|| (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 @@ note_mouse_highlight (f, x, y)
|
||||
if (!NILP (mouse_face))
|
||||
overlay = overlay_vec[i];
|
||||
}
|
||||
dpyinfo->mouse_face_overlay = overlay;
|
||||
|
||||
/* 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 @@ note_mouse_highlight (f, x, y)
|
||||
}
|
||||
}
|
||||
|
||||
check_help_echo:
|
||||
|
||||
/* Look for a `help-echo' property. */
|
||||
{
|
||||
Lisp_Object help, overlay;
|
||||
|
Loading…
Reference in New Issue
Block a user