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

Diff of /emacs/src/xdisp.c

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

revision 1.823 by rms, Thu Mar 27 03:04:22 2003 UTC revision 1.824 by monnier, Fri Mar 28 14:11:55 2003 UTC
# Line 11210  try_cursor_movement (window, startp, scr Line 11210  try_cursor_movement (window, startp, scr
11210    return rc;    return rc;
11211  }  }
11212    
11213    void
11214    set_vertical_scroll_bar (w)
11215         struct window *w;
11216    {
11217      int start, end, whole;
11218    
11219      /* Calculate the start and end positions for the current window.
11220         At some point, it would be nice to choose between scrollbars
11221         which reflect the whole buffer size, with special markers
11222         indicating narrowing, and scrollbars which reflect only the
11223         visible region.
11224        
11225         Note that mini-buffers sometimes aren't displaying any text.  */
11226      if (!MINI_WINDOW_P (w)
11227          || (w == XWINDOW (minibuf_window)
11228              && NILP (echo_area_buffer[0])))
11229        {
11230          struct buffer *buf = XBUFFER (w->buffer);
11231          whole = BUF_ZV (buf) - BUF_BEGV (buf);
11232          start = marker_position (w->start) - BUF_BEGV (buf);
11233          /* I don't think this is guaranteed to be right.  For the
11234             moment, we'll pretend it is.  */
11235          end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf);
11236          
11237          if (end < start)
11238            end = start;
11239          if (whole < (end - start))
11240            whole = end - start;
11241        }
11242      else
11243        start = end = whole = 0;
11244    
11245      /* Indicate what this scroll bar ought to be displaying now.  */
11246      set_vertical_scroll_bar_hook (w, end - start, whole, start);
11247    }
11248    
11249  /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only  /* Redisplay leaf window WINDOW.  JUST_THIS_ONE_P non-zero means only
11250     selected_window is redisplayed.     selected_window is redisplayed.
# Line 11899  redisplay_window (window, just_this_one_ Line 11934  redisplay_window (window, just_this_one_
11934    
11935    if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))    if (FRAME_HAS_VERTICAL_SCROLL_BARS (f))
11936      {      {
11937        int start, end, whole;        /* Set the thumb's position and size.  */
11938          set_vertical_scroll_bar (w);
       /* Calculate the start and end positions for the current window.  
          At some point, it would be nice to choose between scrollbars  
          which reflect the whole buffer size, with special markers  
          indicating narrowing, and scrollbars which reflect only the  
          visible region.  
   
          Note that mini-buffers sometimes aren't displaying any text.  */  
       if (!MINI_WINDOW_P (w)  
           || (w == XWINDOW (minibuf_window)  
               && NILP (echo_area_buffer[0])))  
         {  
           whole = ZV - BEGV;  
           start = marker_position (w->start) - BEGV;  
           /* I don't think this is guaranteed to be right.  For the  
              moment, we'll pretend it is.  */  
           end = (Z - XFASTINT (w->window_end_pos)) - BEGV;  
   
           if (end < start)  
             end = start;  
           if (whole < (end - start))  
             whole = end - start;  
         }  
       else  
         start = end = whole = 0;  
   
       /* Indicate what this scroll bar ought to be displaying now.  */  
       set_vertical_scroll_bar_hook (w, end - start, whole, start);  
11939    
11940        /* Note that we actually used the scroll bar attached to this        /* Note that we actually used the scroll bar attached to this
11941           window, so it shouldn't be deleted at the end of redisplay.  */           window, so it shouldn't be deleted at the end of redisplay.  */

Legend:
Removed from v.1.823  
changed lines
  Added in v.1.824

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