summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 97ffe12775e..f4bf9a92cc4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+1999-12-15 Gerd Moellmann <gerd@gnu.org>
+
+ * xdisp.c (redisplay_window) <optional new window start>: Check
+ that window start is in [BEGV..ZV].
+
1999-12-15 Eli Zaretskii <eliz@is.elta.co.il>
* dispextern.h (FACE_TTY_DEFAULT_FG_COLOR)
diff --git a/src/xdisp.c b/src/xdisp.c
index a88f9893c51..df01be46a0a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8625,7 +8625,9 @@ redisplay_window (window, just_this_one_p)
/* 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)
+ && CHARPOS (startp) >= BEGV
+ && CHARPOS (startp) <= ZV)
{
w->optional_new_start = Qnil;
/* This takes a mini-buffer prompt into account. */