aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2002-12-23 18:04:45 +0000
committerRichard M. Stallman2002-12-23 18:04:45 +0000
commit07ce8b53eae95f8bc5ca40e99cf781966e9a71aa (patch)
treeeb03e122bd2134db73199e4c959691dbc26c86c4 /src
parent76efe10ec7fcb710192af84110a8afb1cec9f25a (diff)
downloademacs-07ce8b53eae95f8bc5ca40e99cf781966e9a71aa.tar.gz
emacs-07ce8b53eae95f8bc5ca40e99cf781966e9a71aa.zip
(window_scroll_pixel_based): Fix check for reaching BEGV.
Don't try to make last line fully visible if it is past end of window.
Diffstat (limited to 'src')
-rw-r--r--src/window.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.c b/src/window.c
index fb81e45cbc4..3f115260adf 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4149,12 +4149,13 @@ window_scroll_pixel_based (window, n, whole, noerror)
4149 4149
4150 /* End if we end up at ZV or BEGV. */ 4150 /* End if we end up at ZV or BEGV. */
4151 if ((n > 0 && IT_CHARPOS (it) == ZV) 4151 if ((n > 0 && IT_CHARPOS (it) == ZV)
4152 || (n < 0 && IT_CHARPOS (it) == CHARPOS (start))) 4152 || (n < 0 && IT_CHARPOS (it) == BEGV))
4153 { 4153 {
4154 if (IT_CHARPOS (it) == ZV) 4154 if (IT_CHARPOS (it) == ZV)
4155 { 4155 {
4156 if (it.current_y + it.max_ascent + it.max_descent 4156 if (it.current_y < it.last_visible_y
4157 > it.last_visible_y) 4157 && (it.current_y + it.max_ascent + it.max_descent
4158 >= it.last_visible_y))
4158 { 4159 {
4159 /* The last line was only partially visible, make it fully 4160 /* The last line was only partially visible, make it fully
4160 visible. */ 4161 visible. */