Hirohito Higashi wrote:
> Hi Bram and Vim developers,
>
> How to reproduce:
> 1. Prepare test_vimrc
> $ cat test_vimrc
> augroup vimrc
> autocmd!
> augroup END
> autocmd vimrc WinEnter * :execute ( (winnr('$') == 1) && (&filetype ==#
> 'qf') ? 'bwipeout!' : '')
>
> 2. Start vim
> $ vim -N -u test_vimrc
>
> 3. Open quickfix window
> :copen
>
> 4. Move current window to above one.
> <C-W>k
>
> 5. Wipe current buffer
> :bwipeout
>
> Expect behavior:
> Display one window and one unnamed buffer.
>
> Actual behavior:
> SEGV
>
> --------
> Investigation result:
> +----------------+
> | win1(buf1) |
> | (current) |
> +----------------+
> | win2(buf2) |
> | |
> +----------------+
> 1. win1 closed and move current window to win2 (in bwipe buf1 process)
> 2. Triggered autocmd(WinEnter) then execute :bwipeout! to buf2
> 3. Now exist window is win2(current). And exist buf is buf1(current).
> 4. Search for the next current buffer candidate. (in bwipe buf1 process)
> 5. Next buffer candidate is NULL !?!? (at buffer.c:1362)
> 6. Wipe current buffer(buf1) and new current buffer(==NULL) !?!?
> 7. SEGV
>
> --------
> Solution
> If next current window candidate is NULL (at buffer.c:1311),
> then create new buffer and close buf1. (like buffer.c:1159 ~ 1180)
> And don't display file info after redraw.
>
> I attached a patch.
> Please check this.
>
> Thanks for reading my crazy english.
Thanks for the patch!
--
hundred-and-one symptoms of being an internet addict:
118. You are on a first-name basis with your ISP's staff.
/// 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.