/[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.494 by kfstorm, Sun Jan 23 13:13:03 2005 UTC revision 1.495 by kfstorm, Mon Jan 24 13:22:29 2005 UTC
# Line 4580  window_scroll_pixel_based (window, n, wh Line 4580  window_scroll_pixel_based (window, n, wh
4580            int px;            int px;
4581            int dy = WINDOW_FRAME_LINE_HEIGHT (w);            int dy = WINDOW_FRAME_LINE_HEIGHT (w);
4582            if (whole)            if (whole)
4583              dy = window_box_height (w) - next_screen_context_lines * dy;              dy = max ((window_box_height (w)
4584                           - next_screen_context_lines * dy),
4585                          dy);
4586            dy *= n;            dy *= n;
4587    
4588            if (n < 0 && (px = XINT (XCAR (tem))) > 0)            if (n < 0 && (px = XINT (XCAR (tem))) > 0)
# Line 4615  window_scroll_pixel_based (window, n, wh Line 4617  window_scroll_pixel_based (window, n, wh
4617    start_display (&it, w, start);    start_display (&it, w, start);
4618    if (whole)    if (whole)
4619      {      {
4620        int screen_full = (window_box_height (w)        int start_pos = IT_CHARPOS (it);
4621                           - next_screen_context_lines * FRAME_LINE_HEIGHT (it.f));        int dy = WINDOW_FRAME_LINE_HEIGHT (w);
4622        int dy = n * screen_full;        dy = max ((window_box_height (w)
4623                     - next_screen_context_lines * dy),
4624                    dy) * n;
4625    
4626        /* Note that move_it_vertically always moves the iterator to the        /* Note that move_it_vertically always moves the iterator to the
4627           start of a line.  So, if the last line doesn't have a newline,           start of a line.  So, if the last line doesn't have a newline,
4628           we would end up at the start of the line ending at ZV.  */           we would end up at the start of the line ending at ZV.  */
4629        if (dy <= 0)        if (dy <= 0)
4630          move_it_vertically_backward (&it, -dy);          {
4631              move_it_vertically_backward (&it, -dy);
4632              /* Ensure we actually does move, e.g. in case we are currently
4633                 looking at an image that is taller that the window height.  */
4634              while (start_pos == IT_CHARPOS (it)
4635                     && start_pos > BEGV)
4636                move_it_by_lines (&it, -1, 1);
4637            }
4638        else if (dy > 0)        else if (dy > 0)
4639          {          {
           int start_pos = IT_CHARPOS (it);  
4640            move_it_to (&it, ZV, -1, it.current_y + dy, -1,            move_it_to (&it, ZV, -1, it.current_y + dy, -1,
4641                        MOVE_TO_POS | MOVE_TO_Y);                        MOVE_TO_POS | MOVE_TO_Y);
4642            /* Ensure we actually does move, e.g. in case we are currently            /* Ensure we actually does move, e.g. in case we are currently

Legend:
Removed from v.1.494  
changed lines
  Added in v.1.495

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