/[emacs]/emacs/src/window.c
ViewVC logotype

Diff of /emacs/src/window.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.505 by lektu, Tue Jun 21 11:29:47 2005 UTC revision 1.506 by rms, Wed Jun 29 23:29:01 2005 UTC
# Line 4783  window_scroll_pixel_based (window, n, wh Line 4783  window_scroll_pixel_based (window, n, wh
4783        /* We moved the window start towards ZV, so PT may be now        /* We moved the window start towards ZV, so PT may be now
4784           in the scroll margin at the top.  */           in the scroll margin at the top.  */
4785        move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);        move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
4786        if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin)        if (IT_CHARPOS (it) == PT && it.current_y >= this_scroll_margin
4787              && (NILP (Vscroll_preserve_screen_position)
4788                  || EQ (Vscroll_preserve_screen_position, Qt)))
4789          /* We found PT at a legitimate height.  Leave it alone.  */          /* We found PT at a legitimate height.  Leave it alone.  */
4790          ;          ;
4791        else if (preserve_y >= 0)        else if (preserve_y >= 0)
# Line 4836  window_scroll_pixel_based (window, n, wh Line 4838  window_scroll_pixel_based (window, n, wh
4838            partial_p = it.current_y > it.last_visible_y;            partial_p = it.current_y > it.last_visible_y;
4839          }          }
4840    
4841        if (charpos == PT && !partial_p)        if (charpos == PT && !partial_p
4842              && (NILP (Vscroll_preserve_screen_position)
4843                  || EQ (Vscroll_preserve_screen_position, Qt)))
4844          /* 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.  */
4845          ;          ;
4846        else if (preserve_y >= 0)        else if (preserve_y >= 0)
# Line 4951  window_scroll_line_based (window, n, who Line 4955  window_scroll_line_based (window, n, who
4955           the window-scroll-functions.  */           the window-scroll-functions.  */
4956        w->force_start = Qt;        w->force_start = Qt;
4957    
4958        if (whole && !NILP (Vscroll_preserve_screen_position))        if (!NILP (Vscroll_preserve_screen_position)
4959              && (whole || !EQ (Vscroll_preserve_screen_position, Qt)))
4960          {          {
4961            SET_PT_BOTH (pos, pos_byte);            SET_PT_BOTH (pos, pos_byte);
4962            Fvertical_motion (make_number (original_vpos), window);            Fvertical_motion (make_number (original_vpos), window);
# Line 6914  If there is only one window, it is split Line 6919  If there is only one window, it is split
6919    
6920    DEFVAR_LISP ("scroll-preserve-screen-position",    DEFVAR_LISP ("scroll-preserve-screen-position",
6921                 &Vscroll_preserve_screen_position,                 &Vscroll_preserve_screen_position,
6922                 doc: /* *Non-nil means scroll commands move point to keep its screen line unchanged.                 doc: /* *Controls if scroll commands move point to keep its screen line unchanged.
6923  This is only when it is impossible to keep point fixed and still  A value of nil means point does not keep its screen position except
6924  scroll as specified.  */);  at the scroll margin or window boundary respectively.
6925    A value of t means point keeps its screen position if the scroll
6926    command moved it vertically out of the window, e.g. when scrolling
6927    by full screens.
6928    Any other value means point always keeps its screen position.  */);
6929    Vscroll_preserve_screen_position = Qnil;    Vscroll_preserve_screen_position = Qnil;
6930    
6931    DEFVAR_LISP ("window-configuration-change-hook",    DEFVAR_LISP ("window-configuration-change-hook",

Legend:
Removed from v.1.505  
changed lines
  Added in v.1.506

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26