diff options
| author | Richard M. Stallman | 2005-01-04 03:00:21 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-01-04 03:00:21 +0000 |
| commit | fa3c342659d5b6e668922c9242d74fd56dbd5a13 (patch) | |
| tree | f802dd0f9beb48e91eb122fcdcdb0713f7830f04 /src | |
| parent | 1766dac37ff8d010c3dde112d9e3066ec54a268c (diff) | |
| download | emacs-fa3c342659d5b6e668922c9242d74fd56dbd5a13.tar.gz emacs-fa3c342659d5b6e668922c9242d74fd56dbd5a13.zip | |
(window_scroll_pixel_based): Don't correct preserve_y
for CURRENT_HEADER_LINE_HEIGHT when moving backwards.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/window.c b/src/window.c index d42ff11d7dd..735bd99fd55 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4688,7 +4688,8 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 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 | ||
| @@ -4728,9 +4729,14 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 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)); |