4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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
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
22 ! *options.txt* For Vim version 7.1. Last change: 2007 May 11
25 VIM REFERENCE MANUAL by Bram Moolenaar
27 ! *options.txt* For Vim version 7.1. Last change: 2007 Aug 10
30 VIM REFERENCE MANUAL by Bram Moolenaar
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
40 'equalprg' 'ep' string (default "")
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.
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
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|.
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|.
72 CTRL-W CTRL-V *CTRL-W_CTRL-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
82 CTRL-W CTRL-V *CTRL-W_CTRL-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
92 Note: In other places CTRL-Q does the same as CTRL-V, but here
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
102 - do_equal = (p_ea && new_size == 0 && *p_ead != 'v');
105 * Check if we are able to split the current window and compute its
109 * instead, if possible. */
111 win_setwidth_win(oldwin->w_width + new_size, oldwin);
117 - do_equal = (p_ea && new_size == 0
118 - #ifdef FEAT_VERTSPLIT
124 * Check if we are able to split the current window and compute its
126 * instead, if possible. */
128 win_setwidth_win(oldwin->w_width + new_size, oldwin);
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)
135 + frp = oldwin->w_frame->fr_parent->fr_child;
136 + while (frp != NULL)
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))
146 + frp = frp->fr_next;
156 * Check if we are able to split the current window and compute its
160 oldwin_height = oldwin->w_height;
162 oldwin_height -= STATUS_HEIGHT;
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
171 + && oldwin->w_frame->fr_parent != NULL)
173 + frp = oldwin->w_frame->fr_parent->fr_child;
174 + while (frp != NULL)
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
184 + frp = frp->fr_next;
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
194 { /* Add new patch number below this line */
200 hundred-and-one symptoms of being an internet addict:
201 129. You cancel your newspaper subscription.
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 ///