/[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.495 by kfstorm, Mon Jan 24 13:22:29 2005 UTC revision 1.496 by kfstorm, Mon Feb 21 22:34:34 2005 UTC
# Line 4763  window_scroll_pixel_based (window, n, wh Line 4763  window_scroll_pixel_based (window, n, wh
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);
# Line 4774  window_scroll_pixel_based (window, n, wh Line 4775  window_scroll_pixel_based (window, n, wh
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)
# Line 4795  window_scroll_pixel_based (window, n, wh Line 4809  window_scroll_pixel_based (window, n, wh
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              {              {

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

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