aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-04-25 14:51:11 +0000
committerGerd Moellmann2001-04-25 14:51:11 +0000
commitbfd8410fc2e9901716ce0a772f8a455afe8f8e21 (patch)
tree7bb86c525ca39423d4f2639dafddd0ffd04285a3
parentbe2488ca370447b610e66a3ea98c43bd821cfb15 (diff)
downloademacs-bfd8410fc2e9901716ce0a772f8a455afe8f8e21.tar.gz
emacs-bfd8410fc2e9901716ce0a772f8a455afe8f8e21.zip
(mouse_face_overlay_overlaps): Fix the computation
of the number of overlays to check.
-rw-r--r--src/ChangeLog3
-rw-r--r--src/buffer.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index eb2f0d07c07..3f399316200 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
12001-04-25 Gerd Moellmann <gerd@gnu.org> 12001-04-25 Gerd Moellmann <gerd@gnu.org>
2 2
3 * buffer.c (mouse_face_overlay_overlaps): Fix the computation
4 of the number of overlays to check.
5
3 * keyboard.c (command_loop_1): Redo change of 2001-03-12. 6 * keyboard.c (command_loop_1): Redo change of 2001-03-12.
4 7
5 * xdisp.c (try_window_id): Fix a case where window_end_pos 8 * xdisp.c (try_window_id): Fix a case where window_end_pos
diff --git a/src/buffer.c b/src/buffer.c
index a8240bafcc9..0171f74e089 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2529,15 +2529,14 @@ mouse_face_overlay_overlaps (overlay)
2529{ 2529{
2530 int start = OVERLAY_POSITION (OVERLAY_START (overlay)); 2530 int start = OVERLAY_POSITION (OVERLAY_START (overlay));
2531 int end = OVERLAY_POSITION (OVERLAY_END (overlay)); 2531 int end = OVERLAY_POSITION (OVERLAY_END (overlay));
2532 int n, i; 2532 int n, i, size;
2533 Lisp_Object *v, tem; 2533 Lisp_Object *v, tem;
2534 2534
2535 n = 10; 2535 size = 10;
2536 v = (Lisp_Object *) alloca (n * sizeof *v); 2536 v = (Lisp_Object *) alloca (size * sizeof *v);
2537 i = overlays_in (start, end, 0, &v, &n, NULL, NULL); 2537 n = overlays_in (start, end, 0, &v, &size, NULL, NULL);
2538 if (i > n) 2538 if (n > size)
2539 { 2539 {
2540 n = i;
2541 v = (Lisp_Object *) alloca (n * sizeof *v); 2540 v = (Lisp_Object *) alloca (n * sizeof *v);
2542 overlays_in (start, end, 0, &v, &n, NULL, NULL); 2541 overlays_in (start, end, 0, &v, &n, NULL, NULL);
2543 } 2542 }