Mercurial > emacs
comparison src/xterm.c @ 30371:f69ecffe8453
(note_mouse_highlight): Process overlays in the right
order of priority.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Fri, 21 Jul 2000 15:54:14 +0000 |
parents | cf4163d1218e |
children | 319c3bad8ada |
comparison
equal
deleted
inserted
replaced
30370:e39d4add1859 | 30371:f69ecffe8453 |
---|---|
6520 { | 6520 { |
6521 len = noverlays; | 6521 len = noverlays; |
6522 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); | 6522 overlay_vec = (Lisp_Object *) alloca (len * sizeof (Lisp_Object)); |
6523 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL); | 6523 noverlays = overlays_at (pos, 0, &overlay_vec, &len, NULL, NULL); |
6524 } | 6524 } |
6525 | 6525 |
6526 /* Sort overlays into increasing priority order. */ | |
6526 noverlays = sort_overlays (overlay_vec, noverlays, w); | 6527 noverlays = sort_overlays (overlay_vec, noverlays, w); |
6527 | 6528 |
6528 /* Check mouse-face highlighting. */ | 6529 /* Check mouse-face highlighting. */ |
6529 if (! (EQ (window, dpyinfo->mouse_face_window) | 6530 if (! (EQ (window, dpyinfo->mouse_face_window) |
6530 && vpos >= dpyinfo->mouse_face_beg_row | 6531 && vpos >= dpyinfo->mouse_face_beg_row |
6538 /* Clear the display of the old active region, if any. */ | 6539 /* Clear the display of the old active region, if any. */ |
6539 clear_mouse_face (dpyinfo); | 6540 clear_mouse_face (dpyinfo); |
6540 | 6541 |
6541 /* Find the highest priority overlay that has a mouse-face prop. */ | 6542 /* Find the highest priority overlay that has a mouse-face prop. */ |
6542 overlay = Qnil; | 6543 overlay = Qnil; |
6543 for (i = 0; i < noverlays; i++) | 6544 for (i = noverlays - 1; i >= 0; --i) |
6544 { | 6545 { |
6545 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face); | 6546 mouse_face = Foverlay_get (overlay_vec[i], Qmouse_face); |
6546 if (!NILP (mouse_face)) | 6547 if (!NILP (mouse_face)) |
6547 { | 6548 { |
6548 overlay = overlay_vec[i]; | 6549 overlay = overlay_vec[i]; |
6628 { | 6629 { |
6629 Lisp_Object help, overlay; | 6630 Lisp_Object help, overlay; |
6630 | 6631 |
6631 /* Check overlays first. */ | 6632 /* Check overlays first. */ |
6632 help = Qnil; | 6633 help = Qnil; |
6633 for (i = 0; i < noverlays && NILP (help); ++i) | 6634 for (i = noverlays - 1; i >= 0 && NILP (help); --i) |
6634 { | 6635 { |
6635 overlay = overlay_vec[i]; | 6636 overlay = overlay_vec[i]; |
6636 help = Foverlay_get (overlay, Qhelp_echo); | 6637 help = Foverlay_get (overlay, Qhelp_echo); |
6637 } | 6638 } |
6638 | 6639 |