]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #10192 with assertion violation when scrolling.
authorEli Zaretskii <eliz@gnu.org>
Sat, 3 Dec 2011 09:55:27 +0000 (11:55 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 3 Dec 2011 09:55:27 +0000 (11:55 +0200)
 src/xdisp.c (redisplay_window): Don't let `margin' become negative.
 This could happen when scroll-margin is zero and scroll-*-aggressively
 is a small float number.

src/ChangeLog
src/xdisp.c

index efba68d99d6deedffffa9216f18f3d07737332a5..61b445930622931b3389b1b2581b42b038bb3592 100644 (file)
@@ -3,6 +3,7 @@
        * xdisp.c (handle_invisible_prop): If the invisible text ends just
        before a newline, prepare the bidi iterator for consuming the
        newline, and keep the current paragraph direction.  (Bug#10183)
+       (redisplay_window): Don't let `margin' become negative.  (Bug#10192)
 
 2011-12-02  Juri Linkov  <juri@jurta.org>
 
index b9741d97d30c78b92cc3a67ce2e46501ef0a8b1d..7708b9c40fa9ab196a7738b61fb552012da23081 100644 (file)
@@ -15617,7 +15617,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
              pt_offset = float_amount * WINDOW_BOX_TEXT_HEIGHT (w);
              if (pt_offset == 0 && float_amount > 0)
                pt_offset = 1;
-             if (pt_offset)
+             if (pt_offset && margin > 0)
                margin -= 1;
            }
          /* Compute how much to move the window start backward from