Consider the following code:

    cat >test-maxsplit.vim <<EOF
    wincmd s
    let b=0
    while b<2
        try
            wincmd v
        catch /^Vim(wincmd):E36:/
            wincmd j
            let b+=1
        endtry
    endwhile
    EOF
    vim -u NONE -S test-maxsplit.vim
This code creates a horizontal split, then splits the upper window vertically 
until limit is reached and tries to do so with the lower window, but fails 
because wincmd reports that there is no space for new split, while there are 
still lots of space to split in a lower window. Everything works fine if you 
close at least one of upper windows. Same if I change «s» to «v», «v» to «s» 
and 
«j» to «h» in wincmd arguments (thus exchanging vertical and horizontal 
splits). 
Tested on vim-7.3.75 from Gentoo repos and on vim-7.3.98 (rev. 763272b18e4f).

Attachment: signature.asc
Description: This is a digitally signed message part.



Raspunde prin e-mail lui