comparison src/window.c @ 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 d583dac59ea4
children ca7101bea5ee
comparison
equal deleted inserted replaced
41979:c8338f001d95 41980:e0aefc6e3422
4582 height minus what's displayed in the line containing PT, 4582 height minus what's displayed in the line containing PT,
4583 and the lines below. */ 4583 and the lines below. */
4584 nlines = - XINT (arg) - 1; 4584 nlines = - XINT (arg) - 1;
4585 move_it_by_lines (&it, nlines, 1); 4585 move_it_by_lines (&it, nlines, 1);
4586 4586
4587 y1 = it.current_y - y0; 4587 y1 = line_bottom_y (&it);
4588 h = line_bottom_y (&it) - y1;
4589 4588
4590 /* If we can't move down NLINES lines because we hit 4589 /* If we can't move down NLINES lines because we hit
4591 the end of the buffer, count in some empty lines. */ 4590 the end of the buffer, count in some empty lines. */
4592 if (it.vpos < nlines) 4591 if (it.vpos < nlines)
4593 y1 += (nlines - it.vpos) * CANON_Y_UNIT (it.f); 4592 y1 += (nlines - it.vpos) * CANON_Y_UNIT (it.f);
4594 4593
4595 y0 = it.last_visible_y - y1 - h; 4594 h = window_box_height (w) - (y1 - y0);
4596 4595
4597 start_display (&it, w, pt); 4596 start_display (&it, w, pt);
4598 move_it_vertically (&it, - y0); 4597 move_it_vertically (&it, - h);
4599 charpos = IT_CHARPOS (it); 4598 charpos = IT_CHARPOS (it);
4600 bytepos = IT_BYTEPOS (it); 4599 bytepos = IT_BYTEPOS (it);
4601 } 4600 }
4602 else 4601 else
4603 { 4602 {