mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-19 04:21:45 -07:00
(mouse_face_overlay_overlaps): Fix the computation
of the number of overlays to check.
This commit is contained in:
parent
be2488ca37
commit
bfd8410fc2
2 changed files with 8 additions and 6 deletions
|
|
@ -1,5 +1,8 @@
|
|||
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
|
||||
|
|
|
|||
11
src/buffer.c
11
src/buffer.c
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue