Sorry for the patch format, I tried to paste it into the list web page, but
it does not allow attachments and splits lines at any point.
David
On Fri, Feb 15, 2008 at 10:39 PM, David Rodríguez Ibeas <[EMAIL PROTECTED]>
wrote:
> During startup with .vimrc containing 'set winminheight=0
> winheight=999' no more than 2 windows are created, independently of
> number of files to open.
>
> $ vim -o file1 file2 file3 file4
>
> will open only two horizontally splitted windows. If winheight is
> removed from .vimrc file four horizontally splitted windows are
> created.
>
> The expected behavior with those config options are 4 horizontally
> splitted windows, one taking all available window space but the status
> lines. Config option recommendation were taken from windows.txt help
> file.
>
> Proposed patch (generated with svn diff window.c) modifies
> make_windows function in window.c, which does not seem to be used
> anywhere else:
>
> Index: window.c
> ===================================================================
> --- window.c (revision 893)
> +++ window.c (working copy)
> @@ -1264,15 +1264,15 @@
> {
> /* Each windows needs at least 'winminwidth' lines and a
> separator
> * column. */
> - maxcount = (curwin->w_width + curwin->w_vsep_width
> - - (p_wiw - p_wmw)) /
> (p_wmw + 1);
> + maxcount = (curwin->w_width + curwin->w_vsep_width)
> + / (p_wmw + 1);
> }
> else
> #endif
> {
> /* Each window needs at least 'winminheight' lines and a
> status line. */
> - maxcount = (curwin->w_height + curwin->w_status_height
> - - (p_wh - p_wmh)) / (p_wmh +
> STATUS_HEIGHT);
> + maxcount = (curwin->w_height + curwin-
> >w_status_height)
> + / (p_wmh + STATUS_HEIGHT);
> }
>
> if (maxcount < 2)
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Index: window.c
===================================================================
--- window.c (revision 893)
+++ window.c (working copy)
@@ -1264,15 +1264,15 @@
{
/* Each windows needs at least 'winminwidth' lines and a separator
* column. */
- maxcount = (curwin->w_width + curwin->w_vsep_width
- - (p_wiw - p_wmw)) / (p_wmw + 1);
+ maxcount = (curwin->w_width + curwin->w_vsep_width)
+ / (p_wmw + 1);
}
else
#endif
{
/* Each window needs at least 'winminheight' lines and a status line. */
- maxcount = (curwin->w_height + curwin->w_status_height
- - (p_wh - p_wmh)) / (p_wmh + STATUS_HEIGHT);
+ maxcount = (curwin->w_height + curwin->w_status_height)
+ / (p_wmh + STATUS_HEIGHT);
}
if (maxcount < 2)