emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c


From: Gerd Moellmann
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c
Date: Fri, 28 Dec 2001 07:44:07 -0500

Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.718 emacs/src/xdisp.c:1.719
*** emacs/src/xdisp.c:1.718     Mon Dec 24 07:16:28 2001
--- emacs/src/xdisp.c   Fri Dec 28 07:42:35 2001
***************
*** 9534,9546 ****
        y0 = it.current_y;
        move_it_to (&it, PT, 0, it.last_visible_y, -1,
                  MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
!       
!       /* With a scroll_margin of 0, scroll_margin_pos is at the window
!        end, which is one line below the window.  The iterator's
!        current_y will be same as y0 in that case, but we have to
!        scroll a line to make PT visible.  That's the reason why 1 is
!        added below.  */
!       dy = 1 + it.current_y - y0;
        
        if (dy > scroll_max)
        return SCROLLING_FAILED;
--- 9534,9544 ----
        y0 = it.current_y;
        move_it_to (&it, PT, 0, it.last_visible_y, -1,
                  MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
! 
!       /* To make point visible, we have to move the window start
!        down so that the line the cursor is in is visible, which
!        means we have to add in the height of the cursor line.  */
!       dy = line_bottom_y (&it) - y0;
        
        if (dy > scroll_max)
        return SCROLLING_FAILED;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]