aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
authorKaroly Lorentey2005-02-23 11:26:15 +0000
committerKaroly Lorentey2005-02-23 11:26:15 +0000
commit37acc4209655b0a2267ee997cca8ebe42274b877 (patch)
tree819c129d8e1ef704dd6288c80a90b175be6f7853 /src/window.c
parente6b2f88783f2c89bedcd2a761c6362fb353dc7a3 (diff)
parentb02c3eedd3a308731c59b048dd3837d132e0cef8 (diff)
downloademacs-37acc4209655b0a2267ee997cca8ebe42274b877.tar.gz
emacs-37acc4209655b0a2267ee997cca8ebe42274b877.zip
Merged from miles@gnu.org--gnu-2005 (patch 27, 120-125)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-120 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-121 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-122 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-123 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-125 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-27 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-300
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/window.c b/src/window.c
index f49e6cccbb7..574c348c460 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4765,6 +4765,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4765 else if (n < 0) 4765 else if (n < 0)
4766 { 4766 {
4767 int charpos, bytepos; 4767 int charpos, bytepos;
4768 int partial_p;
4768 4769
4769 /* Save our position, for the preserve_y case. */ 4770 /* Save our position, for the preserve_y case. */
4770 charpos = IT_CHARPOS (it); 4771 charpos = IT_CHARPOS (it);
@@ -4776,7 +4777,20 @@ window_scroll_pixel_based (window, n, whole, noerror)
4776 it.last_visible_y - this_scroll_margin - 1, -1, 4777 it.last_visible_y - this_scroll_margin - 1, -1,
4777 MOVE_TO_POS | MOVE_TO_Y); 4778 MOVE_TO_POS | MOVE_TO_Y);
4778 4779
4779 if (IT_CHARPOS (it) == PT) 4780 /* Save our position, in case it's correct. */
4781 charpos = IT_CHARPOS (it);
4782 bytepos = IT_BYTEPOS (it);
4783
4784 /* See if point is on a partially visible line at the end. */
4785 if (it.what == IT_EOB)
4786 partial_p = it.current_y + it.ascent + it.descent > it.last_visible_y;
4787 else
4788 {
4789 move_it_by_lines (&it, 1, 1);
4790 partial_p = it.current_y > it.last_visible_y;
4791 }
4792
4793 if (charpos == PT && !partial_p)
4780 /* We found PT before we found the display margin, so PT is ok. */ 4794 /* We found PT before we found the display margin, so PT is ok. */
4781 ; 4795 ;
4782 else if (preserve_y >= 0) 4796 else if (preserve_y >= 0)
@@ -4797,14 +4811,7 @@ window_scroll_pixel_based (window, n, whole, noerror)
4797 } 4811 }
4798 else 4812 else
4799 { 4813 {
4800 /* Save our position, in case it's correct. */ 4814 if (partial_p)
4801 charpos = IT_CHARPOS (it);
4802 bytepos = IT_BYTEPOS (it);
4803
4804 /* See if point is on a partially visible line at the end. */
4805 move_it_by_lines (&it, 1, 1);
4806
4807 if (it.current_y > it.last_visible_y)
4808 /* The last line was only partially visible, so back up two 4815 /* The last line was only partially visible, so back up two
4809 lines to make sure we're on a fully visible line. */ 4816 lines to make sure we're on a fully visible line. */
4810 { 4817 {