Mercurial > emacs
changeset 41980:e0aefc6e3422
(Frecenter): Simplify computation in the case of window
system frames and ARG < 0; use window_box_height.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 12 Dec 2001 13:43:16 +0000 |
parents | c8338f001d95 |
children | e839854f133e |
files | src/window.c |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.c Wed Dec 12 13:42:55 2001 +0000 +++ b/src/window.c Wed Dec 12 13:43:16 2001 +0000 @@ -4584,18 +4584,17 @@ nlines = - XINT (arg) - 1; move_it_by_lines (&it, nlines, 1); - y1 = it.current_y - y0; - h = line_bottom_y (&it) - y1; + y1 = line_bottom_y (&it); /* If we can't move down NLINES lines because we hit the end of the buffer, count in some empty lines. */ if (it.vpos < nlines) y1 += (nlines - it.vpos) * CANON_Y_UNIT (it.f); - y0 = it.last_visible_y - y1 - h; - + h = window_box_height (w) - (y1 - y0); + start_display (&it, w, pt); - move_it_vertically (&it, - y0); + move_it_vertically (&it, - h); charpos = IT_CHARPOS (it); bytepos = IT_BYTEPOS (it); }