aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2011-04-11 19:39:09 +0300
committerEli Zaretskii2011-04-11 19:39:09 +0300
commite896f03ce08aef5fbd6b4d8de84f79a157f1422f (patch)
tree728864170a773fbf0d5395bde8f978ffd933ab80
parent8d8af66d43c24a6c014e8f30c16ed34544b30981 (diff)
parent11997c7643812a3a6f95da1c65c46d1c0307e2a7 (diff)
downloademacs-e896f03ce08aef5fbd6b4d8de84f79a157f1422f.tar.gz
emacs-e896f03ce08aef5fbd6b4d8de84f79a157f1422f.zip
Fix bug #8468 with redisplay and scroll-margin > 0.
src/xdisp.c (redisplay_window): Don't try to determine the character position of the scroll margin if the window start point w->startp is outside the buffer's accessible region.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c9
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 242752cd777..6e54c45453c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-04-11 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (redisplay_window): Don't try to determine the character
4 position of the scroll margin if the window start point w->startp
5 is outside the buffer's accessible region. (Bug#8468)
6
12011-04-10 Eli Zaretskii <eliz@gnu.org> 72011-04-10 Eli Zaretskii <eliz@gnu.org>
2 8
3 Fix write-region and its subroutines for buffers > 2GB. 9 Fix write-region and its subroutines for buffers > 2GB.
diff --git a/src/xdisp.c b/src/xdisp.c
index b0d4b2308a9..fc9771b6a7e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14252,7 +14252,14 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
14252 14252
14253 /* If there is a scroll margin at the top of the window, find 14253 /* If there is a scroll margin at the top of the window, find
14254 its character position. */ 14254 its character position. */
14255 if (margin) 14255 if (margin
14256 /* Cannot call start_display if startp is not in the
14257 accessible region of the buffer. This can happen when we
14258 have just switched to a different buffer and/or changed
14259 its restriction. In that case, startp is initialized to
14260 the character position 1 (BEG) because we did not yet
14261 have chance to display the buffer even once. */
14262 && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV)
14256 { 14263 {
14257 struct it it1; 14264 struct it it1;
14258 14265