]> git.eshelyaron.com Git - emacs.git/commitdiff
(try_scrolling): Make sure `scroll-conservatively' is not too large before
authorJuanma Barranquero <lekktu@gmail.com>
Fri, 16 Apr 2004 19:33:45 +0000 (19:33 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Fri, 16 Apr 2004 19:33:45 +0000 (19:33 +0000)
computing how much to scroll.

src/ChangeLog
src/xdisp.c

index c9cf12dc159ec361c4e50e9b1abfde6ec8973027..df9484ce3deec2b6213ddee481a5e007efb56052 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-16  Juanma Barranquero  <lektu@terra.es>
+
+       * xdisp.c (try_scrolling): Make sure `scroll-conservatively' is
+       not too large before computing how much to scroll.
+
 2004-04-14  Luc Teirlinck  <teirllm@auburn.edu>
 
        * fileio.c (Fverify_visited_file_modtime, Fvisited_file_modtime):
index b16331322144d7974a7f06e41684a836213241ea..2cd1d548457fce54d9ce16061cfff47bf2034663 100644 (file)
@@ -10879,6 +10879,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
   else
     this_scroll_margin = 0;
 
+  /* Force scroll_conservatively to have a reasonable value so it doesn't
+     cause an overflow while computing how much to scroll.  */
+  if (scroll_conservatively)
+    scroll_conservatively = min (scroll_conservatively,
+                                 MOST_POSITIVE_FIXNUM / FRAME_LINE_HEIGHT (f));
+
   /* Compute how much we should try to scroll maximally to bring point
      into view.  */
   if (scroll_step || scroll_conservatively || temp_scroll_step)