Hi all,

When running the 'helpgrep' command if an autocmd modifies the 'cpo' option,
then Vim crashes. This issue was reported back in 2008:

https://groups.google.com/g/vim_dev/c/_xIqgmPwZYM/m/fAZNMm8OOzsJ

This was supposed to be fixed by 7.2b-004:

https://groups.google.com/g/vim_dev/c/yH1xPvbUeFw/m/ljDl2ZRNdTsJ

But I am still able to reproduce this crash using the following test function:

-------------------------------------------------------------
func Test_helpgrep_restore_cpo()
  let save_cpo = &cpo
  augroup QF_Test
    au!
    autocmd BufNew * set cpo=acd
  augroup END

  helpgrep quickfix
  call assert_equal('acd', &cpo)
  %bw!

  set cpo&vim
  augroup QF_Test
    au!
    autocmd BufNew * set cpo=
  augroup END

  helpgrep buffer
  call assert_equal('', &cpo)

  augroup QF_Test
    au!
  augroup END
  %bw!
  let &cpo = save_cpo
endfunc
-------------------------------------------------------------

Regards,
Yegappan

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/CAAW7x7mB%2BKpF5Evc7dbE-pVX%3Daez2zDFw-2mm1UHvJVpOHWFPg%40mail.gmail.com.

Raspunde prin e-mail lui