4763 |
else if (n < 0) |
else if (n < 0) |
4764 |
{ |
{ |
4765 |
int charpos, bytepos; |
int charpos, bytepos; |
4766 |
|
int partial_p; |
4767 |
|
|
4768 |
/* Save our position, for the preserve_y case. */ |
/* Save our position, for the preserve_y case. */ |
4769 |
charpos = IT_CHARPOS (it); |
charpos = IT_CHARPOS (it); |
4775 |
it.last_visible_y - this_scroll_margin - 1, -1, |
it.last_visible_y - this_scroll_margin - 1, -1, |
4776 |
MOVE_TO_POS | MOVE_TO_Y); |
MOVE_TO_POS | MOVE_TO_Y); |
4777 |
|
|
4778 |
if (IT_CHARPOS (it) == PT) |
/* Save our position, in case it's correct. */ |
4779 |
|
charpos = IT_CHARPOS (it); |
4780 |
|
bytepos = IT_BYTEPOS (it); |
4781 |
|
|
4782 |
|
/* See if point is on a partially visible line at the end. */ |
4783 |
|
if (it.what == IT_EOB) |
4784 |
|
partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y; |
4785 |
|
else |
4786 |
|
{ |
4787 |
|
move_it_by_lines (&it, 1, 1); |
4788 |
|
partial_p = it.current_y > it.last_visible_y; |
4789 |
|
} |
4790 |
|
|
4791 |
|
if (charpos == PT && !partial_p) |
4792 |
/* We found PT before we found the display margin, so PT is ok. */ |
/* We found PT before we found the display margin, so PT is ok. */ |
4793 |
; |
; |
4794 |
else if (preserve_y >= 0) |
else if (preserve_y >= 0) |
4809 |
} |
} |
4810 |
else |
else |
4811 |
{ |
{ |
4812 |
/* Save our position, in case it's correct. */ |
if (partial_p) |
|
charpos = IT_CHARPOS (it); |
|
|
bytepos = IT_BYTEPOS (it); |
|
|
|
|
|
/* See if point is on a partially visible line at the end. */ |
|
|
move_it_by_lines (&it, 1, 1); |
|
|
|
|
|
if (it.current_y > it.last_visible_y) |
|
4813 |
/* The last line was only partially visible, so back up two |
/* The last line was only partially visible, so back up two |
4814 |
lines to make sure we're on a fully visible line. */ |
lines to make sure we're on a fully visible line. */ |
4815 |
{ |
{ |