Commit bfd8410f authored by Gerd Moellmann's avatar Gerd Moellmann
Browse files

(mouse_face_overlay_overlaps): Fix the computation

of the number of overlays to check.
parent be2488ca
2001-04-25 Gerd Moellmann <gerd@gnu.org>
* buffer.c (mouse_face_overlay_overlaps): Fix the computation
of the number of overlays to check.
* keyboard.c (command_loop_1): Redo change of 2001-03-12.
* xdisp.c (try_window_id): Fix a case where window_end_pos
......
......@@ -2529,15 +2529,14 @@ mouse_face_overlay_overlaps (overlay)
{
int start = OVERLAY_POSITION (OVERLAY_START (overlay));
int end = OVERLAY_POSITION (OVERLAY_END (overlay));
int n, i;
int n, i, size;
Lisp_Object *v, tem;
n = 10;
v = (Lisp_Object *) alloca (n * sizeof *v);
i = overlays_in (start, end, 0, &v, &n, NULL, NULL);
if (i > n)
size = 10;
v = (Lisp_Object *) alloca (size * sizeof *v);
n = overlays_in (start, end, 0, &v, &size, NULL, NULL);
if (n > size)
{
n = i;
v = (Lisp_Object *) alloca (n * sizeof *v);
overlays_in (start, end, 0, &v, &n, NULL, NULL);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment