Mercurial > emacs
comparison src/window.c @ 59342:132e8f3a36a1
(window_scroll_pixel_based): Don't correct preserve_y
for CURRENT_HEADER_LINE_HEIGHT when moving backwards.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 04 Jan 2005 03:00:21 +0000 |
parents | e5b68c4be92b |
children | d762442d2c8f cb67264d6096 |
comparison
equal
deleted
inserted
replaced
59341:6ce9207392bc | 59342:132e8f3a36a1 |
---|---|
4686 if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin) | 4686 if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin) |
4687 /* We found PT at a legitimate height. Leave it alone. */ | 4687 /* We found PT at a legitimate height. Leave it alone. */ |
4688 ; | 4688 ; |
4689 else if (preserve_y >= 0) | 4689 else if (preserve_y >= 0) |
4690 { | 4690 { |
4691 /* If we have a header line, take account of it. */ | 4691 /* If we have a header line, take account of it. |
4692 This is necessary because we set it.current_y to 0, above. */ | |
4692 if (WINDOW_WANTS_HEADER_LINE_P (w)) | 4693 if (WINDOW_WANTS_HEADER_LINE_P (w)) |
4693 preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); | 4694 preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); |
4694 | 4695 |
4695 move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); | 4696 move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); |
4696 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 4697 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
4726 ; | 4727 ; |
4727 else if (preserve_y >= 0) | 4728 else if (preserve_y >= 0) |
4728 { | 4729 { |
4729 SET_TEXT_POS_FROM_MARKER (start, w->start); | 4730 SET_TEXT_POS_FROM_MARKER (start, w->start); |
4730 start_display (&it, w, start); | 4731 start_display (&it, w, start); |
4732 #if 0 /* It's wrong to subtract this here | |
4733 because we called start_display again | |
4734 and did not alter it.current_y this time. */ | |
4735 | |
4731 /* If we have a header line, take account of it. */ | 4736 /* If we have a header line, take account of it. */ |
4732 if (WINDOW_WANTS_HEADER_LINE_P (w)) | 4737 if (WINDOW_WANTS_HEADER_LINE_P (w)) |
4733 preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); | 4738 preserve_y -= CURRENT_HEADER_LINE_HEIGHT (w); |
4739 #endif | |
4734 | 4740 |
4735 move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); | 4741 move_it_to (&it, -1, -1, preserve_y, -1, MOVE_TO_Y); |
4736 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 4742 SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
4737 } | 4743 } |
4738 else | 4744 else |