]> git.pld-linux.org Git - packages/vim.git/blob - 7.1.068
- updated to 7.1.326
[packages/vim.git] / 7.1.068
1 To: vim-dev@vim.org
2 Subject: patch 7.1.068
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.1.068
11 Problem:    When 'equalalways' is set and splitting a window, it's possible
12             that another small window gets bigger.
13 Solution:   Only equalize window sizes when after a split the windows are
14             smaller than another window. (Martin Toft)
15 Files:      runtime/doc/options.txt, runtime/doc/windows.txt, src/window.c
16
17
18 *** ../vim-7.1.067/runtime/doc/options.txt      Sat May 12 16:27:04 2007
19 --- runtime/doc/options.txt     Sat Aug 11 17:25:38 2007
20 ***************
21 *** 1,4 ****
22 ! *options.txt* For Vim version 7.1.  Last change: 2007 May 11
23   
24   
25                   VIM REFERENCE MANUAL    by Bram Moolenaar
26 --- 1,4 ----
27 ! *options.txt* For Vim version 7.1.  Last change: 2007 Aug 10
28   
29   
30                   VIM REFERENCE MANUAL    by Bram Moolenaar
31 ***************
32 *** 2415,2422 ****
33         When mixing vertically and horizontally split windows, a minimal size
34         is computed and some windows may be larger if there is room.  The
35         'eadirection' option tells in which direction the size is affected.
36 !       Changing the height of a window can be avoided by setting
37 !       'winfixheight'.
38   
39                                                 *'equalprg'* *'ep'*
40   'equalprg' 'ep'               string  (default "")
41 --- 2418,2425 ----
42         When mixing vertically and horizontally split windows, a minimal size
43         is computed and some windows may be larger if there is room.  The
44         'eadirection' option tells in which direction the size is affected.
45 !       Changing the height and width of a window can be avoided by setting
46 !       'winfixheight' and 'winfixwidth', respectively.
47   
48                                                 *'equalprg'* *'ep'*
49   'equalprg' 'ep'               string  (default "")
50 *** ../vim-7.1.067/runtime/doc/windows.txt      Sat May 12 16:42:48 2007
51 --- runtime/doc/windows.txt     Sat Aug 11 17:25:38 2007
52 ***************
53 *** 132,138 ****
54                 the same file.  Make new window N high (default is to use half
55                 the height of the current window).  Reduces the current window
56                 height to create room (and others, if the 'equalalways' option
57 !               is set and 'eadirection' isn't "hor").
58                 Note: CTRL-S does not work on all terminals and might block
59                 further input, use CTRL-Q to get going again.
60                 Also see |++opt| and |+cmd|.
61 --- 132,139 ----
62                 the same file.  Make new window N high (default is to use half
63                 the height of the current window).  Reduces the current window
64                 height to create room (and others, if the 'equalalways' option
65 !               is set, 'eadirection' isn't "hor", and one of them is higher
66 !               than the current or the new window).
67                 Note: CTRL-S does not work on all terminals and might block
68                 further input, use CTRL-Q to get going again.
69                 Also see |++opt| and |+cmd|.
70 ***************
71 *** 140,148 ****
72   CTRL-W CTRL-V                                         *CTRL-W_CTRL-V*
73   CTRL-W v                                              *CTRL-W_v*
74   :[N]vs[plit] [++opt] [+cmd] [file]                    *:vs* *:vsplit*
75 !               Like |:split|, but split vertically.  If 'equalalways' is set
76 !               and 'eadirection' isn't "ver" the windows will be spread out
77 !               horizontally, unless a width was specified.
78                 Note: In other places CTRL-Q does the same as CTRL-V, but here
79                 it doesn't!
80   
81 --- 141,153 ----
82   CTRL-W CTRL-V                                         *CTRL-W_CTRL-V*
83   CTRL-W v                                              *CTRL-W_v*
84   :[N]vs[plit] [++opt] [+cmd] [file]                    *:vs* *:vsplit*
85 !               Like |:split|, but split vertically.  The windows will be
86 !               spread out horizontally if
87 !               1. a width was not specified,
88 !               2. 'equalalways' is set,
89 !               3. 'eadirection' isn't "ver", and
90 !               4. one of the other windows are wider than the current or new
91 !                  window.
92                 Note: In other places CTRL-Q does the same as CTRL-V, but here
93                 it doesn't!
94   
95 *** ../vim-7.1.067/src/window.c Sat Aug 11 13:37:36 2007
96 --- src/window.c        Sat Aug 11 17:25:38 2007
97 ***************
98 *** 733,739 ****
99       if (flags & WSP_VERT)
100       {
101         layout = FR_ROW;
102 -       do_equal = (p_ea && new_size == 0 && *p_ead != 'v');
103   
104         /*
105          * Check if we are able to split the current window and compute its
106 --- 733,738 ----
107 ***************
108 *** 770,785 ****
109          * instead, if possible. */
110         if (oldwin->w_p_wfw)
111             win_setwidth_win(oldwin->w_width + new_size, oldwin);
112       }
113       else
114   #endif
115       {
116         layout = FR_COL;
117 -       do_equal = (p_ea && new_size == 0
118 - #ifdef FEAT_VERTSPLIT
119 -               && *p_ead != 'h'
120 - #endif
121 -               );
122   
123         /*
124          * Check if we are able to split the current window and compute its
125 --- 769,799 ----
126          * instead, if possible. */
127         if (oldwin->w_p_wfw)
128             win_setwidth_win(oldwin->w_width + new_size, oldwin);
129
130 +       /* Only make all windows the same width if one of them (except oldwin)
131 +        * is wider than one of the split windows. */
132 +       if (!do_equal && p_ea && size == 0 && *p_ead != 'v'
133 +          && oldwin->w_frame->fr_parent != NULL)
134 +       {
135 +           frp = oldwin->w_frame->fr_parent->fr_child;
136 +           while (frp != NULL)
137 +           {
138 +               if (frp->fr_win != oldwin && frp->fr_win != NULL
139 +                       && (frp->fr_win->w_width > new_size
140 +                           || frp->fr_win->w_width > oldwin->w_width
141 +                                                  - new_size - STATUS_HEIGHT))
142 +               {
143 +                   do_equal = TRUE;
144 +                   break;
145 +               }
146 +               frp = frp->fr_next;
147 +           }
148 +       }
149       }
150       else
151   #endif
152       {
153         layout = FR_COL;
154   
155         /*
156          * Check if we are able to split the current window and compute its
157 ***************
158 *** 831,836 ****
159 --- 845,873 ----
160             oldwin_height = oldwin->w_height;
161             if (need_status)
162                 oldwin_height -= STATUS_HEIGHT;
163 +       }
164
165 +       /* Only make all windows the same height if one of them (except oldwin)
166 +        * is higher than one of the split windows. */
167 +       if (!do_equal && p_ea && size == 0
168 + #ifdef FEAT_VERTSPLIT
169 +               && *p_ead != 'h'
170 + #endif
171 +          && oldwin->w_frame->fr_parent != NULL)
172 +       {
173 +           frp = oldwin->w_frame->fr_parent->fr_child;
174 +           while (frp != NULL)
175 +           {
176 +               if (frp->fr_win != oldwin && frp->fr_win != NULL
177 +                       && (frp->fr_win->w_height > new_size
178 +                           || frp->fr_win->w_height > oldwin_height - new_size
179 +                                                             - STATUS_HEIGHT))
180 +               {
181 +                   do_equal = TRUE;
182 +                   break;
183 +               }
184 +               frp = frp->fr_next;
185 +           }
186         }
187       }
188   
189 *** ../vim-7.1.067/src/version.c        Sun Aug 12 16:38:03 2007
190 --- src/version.c       Sun Aug 12 16:51:36 2007
191 ***************
192 *** 668,669 ****
193 --- 668,671 ----
194   {   /* Add new patch number below this line */
195 + /**/
196 +     68,
197   /**/
198
199 -- 
200 hundred-and-one symptoms of being an internet addict:
201 129. You cancel your newspaper subscription.
202
203  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
204 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
205 \\\        download, build and distribute -- http://www.A-A-P.org        ///
206  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.047122 seconds and 3 git commands to generate.