aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_quickfix.vim
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2020-09-13 01:39:07 +0900
committererw7 <erw7.github@gmail.com>2020-09-14 00:31:19 +0900
commit80eafef3bb54b3d695b4e23d02d2cb4572c6c224 (patch)
tree6e26ef9b19c401ed129db38c8edb5d28b4853373 /src/nvim/testdir/test_quickfix.vim
parent46f973edf00641390c8e3f9fcc3ec415bc07a7e0 (diff)
downloadrneovim-80eafef3bb54b3d695b4e23d02d2cb4572c6c224.tar.gz
rneovim-80eafef3bb54b3d695b4e23d02d2cb4572c6c224.tar.bz2
rneovim-80eafef3bb54b3d695b4e23d02d2cb4572c6c224.zip
vim-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) https://github.com/vim/vim/commit/b6f1480a6a8b1a6fa4d5da97aeb5f4755b71eb91
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
-rw-r--r--src/nvim/testdir/test_quickfix.vim42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index 926103b69f..52226327b1 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -3342,6 +3342,17 @@ func Test_lvimgrep_crash()
augroup QF_Test
au!
augroup END
+
+ new | only
+ augroup QF_Test
+ au!
+ au BufEnter * call setloclist(0, [], 'r')
+ augroup END
+ call assert_fails('lvimgrep Test_lvimgrep_crash *', 'E926:')
+ augroup QF_Test
+ au!
+ augroup END
+
enew | only
endfunc
@@ -3432,6 +3443,37 @@ func Test_lhelpgrep_autocmd()
call assert_equal('help', &filetype)
call assert_equal(1, getloclist(0, {'nr' : '$'}).nr)
au! QuickFixCmdPost
+
+ new | only
+ augroup QF_Test
+ au!
+ au BufEnter * call setqflist([], 'f')
+ augroup END
+ call assert_fails('helpgrep quickfix', 'E925:')
+ augroup QF_Test
+ au! BufEnter
+ augroup END
+
+ new | only
+ augroup QF_Test
+ au!
+ au BufEnter * call setqflist([], 'r')
+ augroup END
+ call assert_fails('helpgrep quickfix', 'E925:')
+ augroup QF_Test
+ au! BufEnter
+ augroup END
+
+ new | only
+ augroup QF_Test
+ au!
+ au BufEnter * call setloclist(0, [], 'r')
+ augroup END
+ call assert_fails('lhelpgrep quickfix', 'E926:')
+ augroup QF_Test
+ au! BufEnter
+ augroup END
+
new | only
endfunc