Christian Brabandt wrote:

> I had a problem with the NrrwRgn Plugin that seems to hang vim. 
> Debugging it, I could make vim hang with this input:
> 
> vim -N -c 'try|noa sview $VIMRUNTIME/doc/options.txt|finally |bw|endtry
> 
> 
> (It seems my .vimrc interferes, not sure which setting does).
> 
> This hangs in buffer.c
> 
> ,----
> |         * If the deleted buffer is the current one, close the current window
> |          * (unless it's the only window).  Repeat this so long as we end up 
> in
> |          * a window with this buffer (but try at most 10 times).
> |          */
> |         while (buf == curbuf
> | # ifdef FEAT_AUTOCMD
> |                    && !(curwin->w_closing || curwin->w_buffer->b_closing)
> | # endif
> |                    && (firstwin != lastwin || first_tabpage->tp_next != 
> NULL))
> |             win_close(curwin, FALSE);
> `----
> 
> And keeps on trying to close the window and doesn't succeed. So here is
> a patch, that tries at most 10 times.

I wonder why the code doesn't do what the comment says.

Why does it hang anyway?

-- 
hundred-and-one symptoms of being an internet addict:
75. You start wondering whether you could actually upgrade your brain
    with a Pentium Pro microprocessor 80.  The upgrade works just fine.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Raspunde prin e-mail lui