]> granicus.if.org Git - vim/commitdiff
updated for version 7.1-068 v7.1.068
authorBram Moolenaar <Bram@vim.org>
Sun, 12 Aug 2007 14:55:56 +0000 (14:55 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 12 Aug 2007 14:55:56 +0000 (14:55 +0000)
runtime/doc/options.txt
runtime/doc/windows.txt
src/version.c
src/window.c

index eed8854598b7dbfedfc15c5ca0c4f803549e6344..9ee985025d699828a617adcbea1f9f60344dd748 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.1.  Last change: 2007 May 11
+*options.txt*  For Vim version 7.1.  Last change: 2007 Aug 10
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2415,8 +2415,8 @@ A jump table for the options with a short description can be found at |Q_op|.
        When mixing vertically and horizontally split windows, a minimal size
        is computed and some windows may be larger if there is room.  The
        'eadirection' option tells in which direction the size is affected.
-       Changing the height of a window can be avoided by setting
-       'winfixheight'.
+       Changing the height and width of a window can be avoided by setting
+       'winfixheight' and 'winfixwidth', respectively.
 
                                                *'equalprg'* *'ep'*
 'equalprg' 'ep'                string  (default "")
index 76c331060ef12ca209f4394e0dad0dc8cb990ddf..f95b2da84c06bca10e893d49c491e4ae441b529b 100644 (file)
@@ -132,7 +132,8 @@ CTRL-W CTRL-S                                               *CTRL-W_CTRL-S*
                the same file.  Make new window N high (default is to use half
                the height of the current window).  Reduces the current window
                height to create room (and others, if the 'equalalways' option
-               is set and 'eadirection' isn't "hor").
+               is set, 'eadirection' isn't "hor", and one of them is higher
+               than the current or the new window).
                Note: CTRL-S does not work on all terminals and might block
                further input, use CTRL-Q to get going again.
                Also see |++opt| and |+cmd|.
@@ -140,9 +141,13 @@ CTRL-W CTRL-S                                              *CTRL-W_CTRL-S*
 CTRL-W CTRL-V                                          *CTRL-W_CTRL-V*
 CTRL-W v                                               *CTRL-W_v*
 :[N]vs[plit] [++opt] [+cmd] [file]                     *:vs* *:vsplit*
-               Like |:split|, but split vertically.  If 'equalalways' is set
-               and 'eadirection' isn't "ver" the windows will be spread out
-               horizontally, unless a width was specified.
+               Like |:split|, but split vertically.  The windows will be
+               spread out horizontally if
+               1. a width was not specified,
+               2. 'equalalways' is set,
+               3. 'eadirection' isn't "ver", and
+               4. one of the other windows are wider than the current or new
+                  window.
                Note: In other places CTRL-Q does the same as CTRL-V, but here
                it doesn't!
 
index a3c141649115a953ff6f954acb651ed09830b25c..fb80f28fcb156039c4f2b5aa874f27fb779d26a1 100644 (file)
@@ -666,6 +666,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    68,
 /**/
     67,
 /**/
index 2891972254063b383ae591ad7933ac2991a2c139..b94fc34a5030f5305c84b36daafdc28b3d636b17 100644 (file)
@@ -733,7 +733,6 @@ win_split_ins(size, flags, newwin, dir)
     if (flags & WSP_VERT)
     {
        layout = FR_ROW;
-       do_equal = (p_ea && new_size == 0 && *p_ead != 'v');
 
        /*
         * Check if we are able to split the current window and compute its
@@ -770,16 +769,31 @@ win_split_ins(size, flags, newwin, dir)
         * instead, if possible. */
        if (oldwin->w_p_wfw)
            win_setwidth_win(oldwin->w_width + new_size, oldwin);
+
+       /* Only make all windows the same width if one of them (except oldwin)
+        * is wider than one of the split windows. */
+       if (!do_equal && p_ea && size == 0 && *p_ead != 'v'
+          && oldwin->w_frame->fr_parent != NULL)
+       {
+           frp = oldwin->w_frame->fr_parent->fr_child;
+           while (frp != NULL)
+           {
+               if (frp->fr_win != oldwin && frp->fr_win != NULL
+                       && (frp->fr_win->w_width > new_size
+                           || frp->fr_win->w_width > oldwin->w_width
+                                                  - new_size - STATUS_HEIGHT))
+               {
+                   do_equal = TRUE;
+                   break;
+               }
+               frp = frp->fr_next;
+           }
+       }
     }
     else
 #endif
     {
        layout = FR_COL;
-       do_equal = (p_ea && new_size == 0
-#ifdef FEAT_VERTSPLIT
-               && *p_ead != 'h'
-#endif
-               );
 
        /*
         * Check if we are able to split the current window and compute its
@@ -832,6 +846,29 @@ win_split_ins(size, flags, newwin, dir)
            if (need_status)
                oldwin_height -= STATUS_HEIGHT;
        }
+
+       /* Only make all windows the same height if one of them (except oldwin)
+        * is higher than one of the split windows. */
+       if (!do_equal && p_ea && size == 0
+#ifdef FEAT_VERTSPLIT
+               && *p_ead != 'h'
+#endif
+          && oldwin->w_frame->fr_parent != NULL)
+       {
+           frp = oldwin->w_frame->fr_parent->fr_child;
+           while (frp != NULL)
+           {
+               if (frp->fr_win != oldwin && frp->fr_win != NULL
+                       && (frp->fr_win->w_height > new_size
+                           || frp->fr_win->w_height > oldwin_height - new_size
+                                                             - STATUS_HEIGHT))
+               {
+                   do_equal = TRUE;
+                   break;
+               }
+               frp = frp->fr_next;
+           }
+       }
     }
 
     /*