diff options
| author | Eli Zaretskii | 2011-04-11 18:59:30 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2011-04-11 18:59:30 +0300 |
| commit | 11997c7643812a3a6f95da1c65c46d1c0307e2a7 (patch) | |
| tree | f4844993f30f8d856a839085b5f9d13601ae9130 /src | |
| parent | 09725d2628e9b8a796d128d24e7255a57c2424f3 (diff) | |
| download | emacs-11997c7643812a3a6f95da1c65c46d1c0307e2a7.tar.gz emacs-11997c7643812a3a6f95da1c65c46d1c0307e2a7.zip | |
Fix bug #8468 with redisplay when 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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6e9a169e8a8..c164c6b5f58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-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. | ||
| 6 | |||
| 1 | 2011-03-30 Eli Zaretskii <eliz@gnu.org> | 7 | 2011-03-30 Eli Zaretskii <eliz@gnu.org> |
| 2 | 8 | ||
| 3 | * xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the | 9 | * xdisp.c (syms_of_xdisp) <scroll-conservatively>: Document the |
diff --git a/src/xdisp.c b/src/xdisp.c index 9e331739cd9..2b032bd6597 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14248,7 +14248,14 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 14248 | 14248 | ||
| 14249 | /* If there is a scroll margin at the top of the window, find | 14249 | /* If there is a scroll margin at the top of the window, find |
| 14250 | its character position. */ | 14250 | its character position. */ |
| 14251 | if (margin) | 14251 | if (margin |
| 14252 | /* Cannot call start_display if startp is not in the | ||
| 14253 | accessible region of the buffer. This can happen when we | ||
| 14254 | have just switched to a different buffer and/or changed | ||
| 14255 | its restriction. In that case, startp is initialized to | ||
| 14256 | the character position 1 (BEG) because we did not yet | ||
| 14257 | have chance to display the buffer even once. */ | ||
| 14258 | && BEGV <= CHARPOS (startp) && CHARPOS (startp) <= ZV) | ||
| 14252 | { | 14259 | { |
| 14253 | struct it it1; | 14260 | struct it it1; |
| 14254 | 14261 | ||