/[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.376.4.9 by lektu, Tue Feb 4 17:47:05 2003 UTC revision 1.376.4.10 by rms, Tue Jun 10 18:17:50 2003 UTC
# Line 4049  window_scroll_pixel_based (window, n, wh Line 4049  window_scroll_pixel_based (window, n, wh
4049    else    else
4050      move_it_by_lines (&it, n, 1);      move_it_by_lines (&it, n, 1);
4051    
4052    /* End if we end up at ZV or BEGV.  */    /* We failed if we find ZV is already on the screen (scrolling up,
4053         means there's nothing past the end), or if we can't start any
4054         earlier (scrolling down, means there's nothing past the top).  */
4055    if ((n > 0 && IT_CHARPOS (it) == ZV)    if ((n > 0 && IT_CHARPOS (it) == ZV)
4056        || (n < 0 && IT_CHARPOS (it) == CHARPOS (start)))        || (n < 0 && IT_CHARPOS (it) == CHARPOS (start)))
4057      {      {
4058        if (IT_CHARPOS (it) == ZV)        if (IT_CHARPOS (it) == ZV)
4059          {          {
4060            if (it.current_y + it.max_ascent + it.max_descent            if (it.current_y < it.last_visible_y
4061                > it.last_visible_y)                && (it.current_y + it.max_ascent + it.max_descent
4062                      >= it.last_visible_y))
4063              {              {
4064                /* The last line was only partially visible, make it fully                /* The last line was only partially visible, make it fully
4065                   visible.  */                   visible.  */
# Line 4091  window_scroll_pixel_based (window, n, wh Line 4094  window_scroll_pixel_based (window, n, wh
4094    
4095    if (! vscrolled)    if (! vscrolled)
4096      {      {
4097          int pos = IT_CHARPOS (it);
4098          int bytepos;
4099    
4100          /* If in the middle of a multi-glyph character move forward to
4101             the next character.  */
4102          if (in_display_vector_p (&it))
4103            {
4104              ++pos;
4105              move_it_to (&it, pos, -1, -1, -1, MOVE_TO_POS);
4106            }
4107    
4108        /* Set the window start, and set up the window for redisplay.  */        /* Set the window start, and set up the window for redisplay.  */
4109        set_marker_restricted (w->start, make_number (IT_CHARPOS (it)),        set_marker_restricted (w->start, make_number (pos),
4110                               w->buffer);                               w->buffer);
4111        w->start_at_line_beg = Fbolp ();        bytepos = XMARKER (w->start)->bytepos;
4112          w->start_at_line_beg = ((pos == BEGV || FETCH_BYTE (bytepos - 1) == '\n')
4113                                  ? Qt : Qnil);
4114        w->update_mode_line = Qt;        w->update_mode_line = Qt;
4115        XSETFASTINT (w->last_modified, 0);        XSETFASTINT (w->last_modified, 0);
4116        XSETFASTINT (w->last_overlay_modified, 0);        XSETFASTINT (w->last_overlay_modified, 0);
# Line 4124  window_scroll_pixel_based (window, n, wh Line 4140  window_scroll_pixel_based (window, n, wh
4140               in the scroll margin at the top.  */               in the scroll margin at the top.  */
4141            move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);            move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
4142            while (it.current_y < this_scroll_margin)            while (it.current_y < this_scroll_margin)
4143              move_it_by_lines (&it, 1, 1);              {
4144                  int prev = it.current_y;
4145                  move_it_by_lines (&it, 1, 1);
4146                  if (prev == it.current_y)
4147                    break;
4148                }
4149            SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));            SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
4150          }          }
4151        else if (n < 0)        else if (n < 0)

Legend:
Removed from v.1.376.4.9  
changed lines
  Added in v.1.376.4.10

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