From 75c5501b44db3d78af88972788ae77c45c4c9404 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 16 Apr 2004 19:33:45 +0000 Subject: [PATCH] (try_scrolling): Make sure `scroll-conservatively' is not too large before computing how much to scroll. --- src/ChangeLog | 5 +++++ src/xdisp.c | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index c9cf12dc159..df9484ce3de 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-04-16 Juanma Barranquero + + * xdisp.c (try_scrolling): Make sure `scroll-conservatively' is + not too large before computing how much to scroll. + 2004-04-14 Luc Teirlinck * fileio.c (Fverify_visited_file_modtime, Fvisited_file_modtime): diff --git a/src/xdisp.c b/src/xdisp.c index b1633132214..2cd1d548457 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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) -- 2.11.4.GIT