Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 14956:940def6df43f v8.1.0489
patch 8.1.0489: crash when autocmd clears vimpgrep location list
commit https://github.com/vim/vim/commit/b6f1480a6a8b1a6fa4d5da97aeb5f4755b71eb91
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Oct 21 18:47:43 2018 +0200
patch 8.1.0489: crash when autocmd clears vimpgrep location list
Problem: Crash when autocmd clears vimpgrep location list.
Solution: Return from qf_jump_edit_buffer() early. (Yegappan Lakshmanan)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 21 Oct 2018 19:00:07 +0200 |
parents | 69d2749a6a2f |
children | 676db1b7fc35 |
comparison
equal
deleted
inserted
replaced
14955:9a25c06e8803 | 14956:940def6df43f |
---|---|
3253 augroup END | 3253 augroup END |
3254 lvimgrep quickfix test_quickfix.vim | 3254 lvimgrep quickfix test_quickfix.vim |
3255 augroup QF_Test | 3255 augroup QF_Test |
3256 au! | 3256 au! |
3257 augroup END | 3257 augroup END |
3258 | |
3259 new | only | |
3260 augroup QF_Test | |
3261 au! | |
3262 au BufEnter * call setloclist(0, [], 'r') | |
3263 augroup END | |
3264 call assert_fails('lvimgrep Test_lvimgrep_crash *', 'E926:') | |
3265 augroup QF_Test | |
3266 au! | |
3267 augroup END | |
3268 | |
3258 enew | only | 3269 enew | only |
3259 endfunc | 3270 endfunc |
3260 | 3271 |
3261 " Test for the position of the quickfix and location list window | 3272 " Test for the position of the quickfix and location list window |
3262 func Test_qfwin_pos() | 3273 func Test_qfwin_pos() |
3335 call assert_equal(0, getloclist(0, {'nr' : '$'}).nr) | 3346 call assert_equal(0, getloclist(0, {'nr' : '$'}).nr) |
3336 lhelpgrep tabpage | 3347 lhelpgrep tabpage |
3337 call assert_equal('help', &filetype) | 3348 call assert_equal('help', &filetype) |
3338 call assert_equal(1, getloclist(0, {'nr' : '$'}).nr) | 3349 call assert_equal(1, getloclist(0, {'nr' : '$'}).nr) |
3339 au! QuickFixCmdPost | 3350 au! QuickFixCmdPost |
3351 | |
3352 new | only | |
3353 augroup QF_Test | |
3354 au! | |
3355 au BufEnter * call setqflist([], 'f') | |
3356 augroup END | |
3357 call assert_fails('helpgrep quickfix', 'E925:') | |
3358 augroup QF_Test | |
3359 au! BufEnter | |
3360 augroup END | |
3361 | |
3362 new | only | |
3363 augroup QF_Test | |
3364 au! | |
3365 au BufEnter * call setqflist([], 'r') | |
3366 augroup END | |
3367 call assert_fails('helpgrep quickfix', 'E925:') | |
3368 augroup QF_Test | |
3369 au! BufEnter | |
3370 augroup END | |
3371 | |
3372 new | only | |
3373 augroup QF_Test | |
3374 au! | |
3375 au BufEnter * call setloclist(0, [], 'r') | |
3376 augroup END | |
3377 call assert_fails('lhelpgrep quickfix', 'E926:') | |
3378 augroup QF_Test | |
3379 au! BufEnter | |
3380 augroup END | |
3381 | |
3340 new | only | 3382 new | only |
3341 endfunc | 3383 endfunc |
3342 | 3384 |
3343 " Test for shortening/simplifying the file name when opening the | 3385 " Test for shortening/simplifying the file name when opening the |
3344 " quickfix window or when displaying the quickfix list | 3386 " quickfix window or when displaying the quickfix list |