aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-03-29 21:58:13 +0200
committerEli Zaretskii2011-03-29 21:58:13 +0200
commit492001e973aa9cbd43f213d12b9ea2717b306b9b (patch)
treee466e2e46e0880ad66b5d05e762d70903ea59349 /src
parent9f3842cef7423e3ce6f75721284e6351f3a200e5 (diff)
downloademacs-492001e973aa9cbd43f213d12b9ea2717b306b9b.tar.gz
emacs-492001e973aa9cbd43f213d12b9ea2717b306b9b.zip
Fix off-by-one in scroll down aggressively.
src/xdisp.c (try_scrolling): When scrolling down aggressively, scroll one screen line less, to make sure we end up at the margin for fractions close to 1.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cb9096a5a5c..dda98bc73a7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12011-03-29 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (try_scrolling): When scrolling down aggressively,
4 scroll one screen line less, to make sure we end up at the margin
5 for fractions close to 1.
6
12011-03-28 Eli Zaretskii <eliz@gnu.org> 72011-03-28 Eli Zaretskii <eliz@gnu.org>
2 8
3 * xdisp.c (try_scrolling): When point is above the window, allow 9 * xdisp.c (try_scrolling): When point is above the window, allow
diff --git a/src/xdisp.c b/src/xdisp.c
index 871d070ed31..7983c118134 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13212,7 +13212,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
13212 amount_to_scroll = float_amount; 13212 amount_to_scroll = float_amount;
13213 if (amount_to_scroll == 0 && float_amount > 0) 13213 if (amount_to_scroll == 0 && float_amount > 0)
13214 amount_to_scroll = 1; 13214 amount_to_scroll = 1;
13215 amount_to_scroll -= this_scroll_margin - dy; 13215 amount_to_scroll -=
13216 this_scroll_margin - dy - FRAME_LINE_HEIGHT (f);
13216 /* Don't let point enter the scroll margin near 13217 /* Don't let point enter the scroll margin near
13217 bottom of the window. */ 13218 bottom of the window. */
13218 if (amount_to_scroll > height - 2*this_scroll_margin + dy) 13219 if (amount_to_scroll > height - 2*this_scroll_margin + dy)