comparison src/testdir/test_quickfix.vim @ 13756:c38f29387245 v8.0.1750

patch 8.0.1750: crash when clearing loccation list in autocommand commit https://github.com/vim/vim/commit/3b9474b4ad4d85b5396f7f641b436f193dc9d486 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 23 21:29:48 2018 +0200 patch 8.0.1750: crash when clearing loccation list in autocommand Problem: Crash when clearing loccation list in autocommand. Solution: Check if "qi" equals "ql_info". (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Mon, 23 Apr 2018 21:30:06 +0200
parents 89223f5d5d12
children aef8ba129a4f
comparison
equal deleted inserted replaced
13755:5f94d5556dae 13756:c38f29387245
3173 3173
3174 call delete('Xtest1.txt') 3174 call delete('Xtest1.txt')
3175 call delete('Xtest2.txt') 3175 call delete('Xtest2.txt')
3176 call setqflist([], 'f') 3176 call setqflist([], 'f')
3177 endfunc 3177 endfunc
3178
3179 " The following test used to crash Vim
3180 func Test_lhelpgrep_autocmd()
3181 lhelpgrep quickfix
3182 autocmd QuickFixCmdPost * call setloclist(0, [], 'f')
3183 lhelpgrep buffer
3184 call assert_equal('help', &filetype)
3185 call assert_equal(0, getloclist(0, {'nr' : '$'}).nr)
3186 lhelpgrep tabpage
3187 call assert_equal('help', &filetype)
3188 call assert_equal(1, getloclist(0, {'nr' : '$'}).nr)
3189 au! QuickFixCmdPost
3190 new | only
3191 endfunc