From: Richard M. Stallman Date: Tue, 23 Aug 1994 20:50:09 +0000 (+0000) Subject: (redisplay_window): Don't access text before BEGV. X-Git-Tag: emacs-19.34~7259 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b16234d8488edb56683281319169c861ebd5667c;p=emacs.git (redisplay_window): Don't access text before BEGV. --- 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)