Marcin Szamotulski wrote:
> Here is a way to crash vim (vim -u NONE --noplugin).
>
> Set an autocommand:
>
> au BufUnload * :call setloclist(0, [{'bufnr':1, 'lnum':1, 'col':1, 'text':
> 'tango down'}])
>
> Now run:
>
> :lvimgrep /.*/ *.txt
>
> And vim goes down.
I can reproduce it.
> Should lvimgrep trigger BufUnload autocommands? Where it is useful?
Vimgrep works by loading the file into a buffer. That triggers
autocommands to be able to search in compressed files and handles
encoding conversions. BufUnload may be needed to undo the effect of
BufRead autocommands.
I'll put this on the todo list, but it's unlikely that I will be able to
fix it soon. I hope someone can make a patch.
--
The goal of science is to build better mousetraps.
The goal of nature is to build better mice.
/// 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