/[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.5 by gerd, Wed Dec 12 13:46:24 2001 UTC revision 1.376.4.6 by rms, Fri Jan 18 03:51:33 2002 UTC
# Line 3521  enlarge_window (window, delta, widthflag Line 3521  enlarge_window (window, delta, widthflag
3521        register int delta1;        register int delta1;
3522        register int opht = (*sizefun) (parent);        register int opht = (*sizefun) (parent);
3523    
       /* If trying to grow this window to or beyond size of the parent,  
          make delta1 so big that, on shrinking back down,  
          all the siblings end up with less than one line and are deleted.  */  
3524        if (opht <= XINT (*sizep) + delta)        if (opht <= XINT (*sizep) + delta)
3525          delta1 = opht * opht * 2;          {
3526              /* If trying to grow this window to or beyond size of the parent,
3527                 just delete all the sibling windows.  */
3528              Lisp_Object tem, next;
3529    
3530              tem = XWINDOW (parent)->vchild;
3531              if (NILP (tem))
3532                tem = XWINDOW (parent)->hchild;
3533    
3534              while (! NILP (tem))
3535                {
3536                  next = XWINDOW (tem)->next;
3537                  if (!EQ (tem, window))
3538                    delete_window (tem);
3539                  tem = next;
3540                }
3541            }
3542        else        else
3543          {          {
3544            /* Otherwise, make delta1 just right so that if we add            /* Otherwise, make delta1 just right so that if we add
# Line 3568  enlarge_window (window, delta, widthflag Line 3581  enlarge_window (window, delta, widthflag
3581                ++n;                ++n;
3582    
3583            delta1 = n * delta;            delta1 = n * delta;
         }  
3584    
3585        /* Add delta1 lines or columns to this window, and to the parent,            /* Add delta1 lines or columns to this window, and to the parent,
3586           keeping things consistent while not affecting siblings.  */               keeping things consistent while not affecting siblings.  */
3587        XSETINT (CURSIZE (parent), opht + delta1);            XSETINT (CURSIZE (parent), opht + delta1);
3588        (*setsizefun) (window, XINT (*sizep) + delta1, 0);            (*setsizefun) (window, XINT (*sizep) + delta1, 0);
3589    
3590        /* Squeeze out delta1 lines or columns from our parent,            /* Squeeze out delta1 lines or columns from our parent,
3591           shriking this window and siblings proportionately.               shriking this window and siblings proportionately.
3592           This brings parent back to correct size.               This brings parent back to correct size.
3593           Delta1 was calculated so this makes this window the desired size,               Delta1 was calculated so this makes this window the desired size,
3594           taking it all out of the siblings.  */               taking it all out of the siblings.  */
3595        (*setsizefun) (parent, opht, 0);            (*setsizefun) (parent, opht, 0);
3596    
3597            }
3598      }      }
3599    
3600    XSETFASTINT (p->last_modified, 0);    XSETFASTINT (p->last_modified, 0);

Legend:
Removed from v.1.376.4.5  
changed lines
  Added in v.1.376.4.6

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