From 81d2de9b9ccc993e5e274b56c17ac045e1da38d5 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 19 May 1998 22:34:36 +0000 Subject: [PATCH] (redisplay_window): Don't use window->start if it is out of range of BEGV/ZV. --- src/xdisp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9564cd841f3..f670259f3b8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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; } - + /* Display one line of window W, starting at char position START in W's buffer. START_BYTE is the corresponding byte position. -- 2.39.2