(redisplay_window): Don't use window->start
authorRichard M. Stallman <rms@gnu.org>
Tue, 19 May 1998 22:34:36 +0000 (22:34 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 19 May 1998 22:34:36 +0000 (22:34 +0000)
if it is out of range of BEGV/ZV.

src/xdisp.c

index 9564cd8..f670259 100644 (file)
@@ -1897,7 +1897,8 @@ redisplay_window (window, just_this_one, preserve_echo_area)
 
   /* If someone specified a new starting point but did not insist,
      check whether it can be used.  */
-  if (!NILP (w->optional_new_start))
+  if (!NILP (w->optional_new_start)
+      && startp >= BEGV && startp <= ZV)
     {
       w->optional_new_start = Qnil;
       /* Check whether this start pos is usable given where point is.  */
@@ -3135,7 +3136,7 @@ pos_tab_offset (w, pos, pos_byte)
 
   return col;
 }
-\f\f
+\f
 /* Display one line of window W, starting at char position START in W's buffer.
    START_BYTE is the corresponding byte position.