David Rodriguez Ibeas 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)


This breaks it for people who set 'winheight' to 10 and expect all
windows to be 10 lines high.

Another solution is to set 'winheight' after startup is done:

        au VimEnter * set winheight=999


-- 
How To Keep A Healthy Level Of Insanity:
12. Sing along at the opera.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui