diff options
| author | Gerd Moellmann | 2000-07-21 15:54:14 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-21 15:54:14 +0000 |
| commit | f83490015c7a46bd71735bc9b81782283c958724 (patch) | |
| tree | 40e3bced19688423d108a9431eb2fb7351438015 /src | |
| parent | 743934dbc8ff5151ebca1725e5c6c1606f4f0505 (diff) | |
| download | emacs-f83490015c7a46bd71735bc9b81782283c958724.tar.gz emacs-f83490015c7a46bd71735bc9b81782283c958724.zip | |
(note_mouse_highlight): Process overlays in the right
order of priority.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c index 309ed552b1e..aec7d3b7338 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6522,7 +6522,8 @@ note_mouse_highlight (f, x, y) | |||
| 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. */ |
| @@ -6540,7 +6541,7 @@ note_mouse_highlight (f, x, y) | |||
| 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)) |
| @@ -6630,7 +6631,7 @@ note_mouse_highlight (f, x, y) | |||
| 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); |