diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-05 23:17:34 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2019-05-05 23:18:47 +0200 |
| commit | 4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771 (patch) | |
| tree | 783008d263f4e7a9986e819c8d67097775f13d1c /src/nvim/testdir | |
| parent | 4b65a0059aff80802783824ab3d973543a83a7c6 (diff) | |
| download | rneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.tar.gz rneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.tar.bz2 rneovim-4658e9c1d9ba52edcdaec1ba5d6075b6bcef6771.zip | |
vim-patch:8.0.1750: crash clearing location list #9968
Problem: Crash when clearing loccation list in autocommand.
Solution: Check if "qi" equals "ql_info". (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/3b9474b4ad4d85b5396f7f641b436f193dc9d486
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index f51b99c189..a5845c5206 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2862,13 +2862,13 @@ func Test_qftitle() " :cgetexpr exe "cgetexpr readfile('Xerr')" call assert_equal(":cgetexpr readfile('Xerr')", - \ getqflist({'title' : 1}).title) + \ getqflist({'title' : 1}).title) " :caddexpr call setqflist([], 'f') exe "caddexpr readfile('Xerr')" call assert_equal(":caddexpr readfile('Xerr')", - \ getqflist({'title' : 1}).title) + \ getqflist({'title' : 1}).title) " :cbuffer new Xerr @@ -2968,6 +2968,20 @@ func Test_qfwin_pos() close endfunc +" The following test used to crash Vim +func Test_lhelpgrep_autocmd() + lhelpgrep quickfix + autocmd QuickFixCmdPost * call setloclist(0, [], 'f') + lhelpgrep buffer + call assert_equal('help', &filetype) + call assert_equal(0, getloclist(0, {'nr' : '$'}).nr) + lhelpgrep tabpage + call assert_equal('help', &filetype) + call assert_equal(1, getloclist(0, {'nr' : '$'}).nr) + au! QuickFixCmdPost + new | only +endfunc + " Test to make sure that an empty quickfix buffer is not reused for loading " a normal buffer. func Test_empty_qfbuf() |