From b16234d8488edb56683281319169c861ebd5667c Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 23 Aug 1994 20:50:09 +0000 Subject: [PATCH] (redisplay_window): Don't access text before BEGV. --- src/xdisp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 4af4988c3ba..82e88fd9ab5 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1179,7 +1179,7 @@ redisplay_window (window, just_this_one) /* If current starting point was originally the beginning of a line but no longer is, find a new starting point. */ else if (!NILP (w->start_at_line_beg) - && !(startp == BEGV + && !(startp <= BEGV || FETCH_CHAR (startp - 1) == '\n')) { goto recenter; @@ -1272,8 +1272,8 @@ recenter: try_window (window, pos.bufpos); startp = marker_position (w->start); - w->start_at_line_beg = - (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; + w->start_at_line_beg + = (startp == BEGV || FETCH_CHAR (startp - 1) == '\n') ? Qt : Qnil; done: if ((!NILP (w->update_mode_line) -- 2.39.5