Mercurial > emacs
changeset 109227:2b07fb05e3ed
Merge from mainline.
author | Katsumi Yamaoka <katsumi@flagship2> |
---|---|
date | Mon, 21 Jun 2010 12:18:05 +0000 |
parents | a4002b21a37b (current diff) 85a8c1358bb7 (diff) |
children | 266c496c7220 |
files | |
diffstat | 3 files changed, 27 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/INSTALL Sun Jun 20 11:23:04 2010 +0000 +++ b/INSTALL Mon Jun 21 12:18:05 2010 +0000 @@ -105,8 +105,7 @@ Note that the install automatically saves space by compressing (provided you have the `gzip' program) those installed Lisp source (.el) - files that have corresponding .elc versions. You may also wish - to compress the installed Info files. + files that have corresponding .elc versions, as well as the Info files. ADDITIONAL DISTRIBUTION FILES
--- a/src/ChangeLog Sun Jun 20 11:23:04 2010 +0000 +++ b/src/ChangeLog Mon Jun 21 12:18:05 2010 +0000 @@ -1,3 +1,9 @@ +2010-06-20 Eli Zaretskii <eliz@gnu.org> + + * xdisp.c (try_scrolling): When scroll-conservatively is set to + most-positive-fixnum, be extra accurate when scrolling window + start, to avoid missing the cursor line. + 2010-06-19 Eli Zaretskii <eliz@gnu.org> * xdisp.c (try_scrolling): Compute the limit for searching point
--- a/src/xdisp.c Sun Jun 20 11:23:04 2010 +0000 +++ b/src/xdisp.c Mon Jun 21 12:18:05 2010 +0000 @@ -13486,7 +13486,26 @@ return SCROLLING_FAILED; start_display (&it, w, startp); - move_it_vertically (&it, amount_to_scroll); + if (scroll_max < INT_MAX) + move_it_vertically (&it, amount_to_scroll); + else + { + /* Extra precision for users who set scroll-conservatively + to most-positive-fixnum: make sure the amount we scroll + the window start is never less than amount_to_scroll, + which was computed as distance from window bottom to + point. This matters when lines at window top and lines + below window bottom have different height. */ + struct it it1 = it; + /* We use a temporary it1 because line_bottom_y can modify + its argument, if it moves one line down; see there. */ + int start_y = line_bottom_y (&it1); + + do { + move_it_by_lines (&it, 1, 1); + it1 = it; + } while (line_bottom_y (&it1) - start_y < amount_to_scroll); + } /* If STARTP is unchanged, move it down another screen line. */ if (CHARPOS (it.current.pos) == CHARPOS (startp))