diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-03-24 12:39:31 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-03-26 09:51:59 +0800 |
| commit | d8b4f3e3b83d5a0fd5d844da34da23c88dc9c4c5 (patch) | |
| tree | 006530ae92e70ebfa98a8723999f1cbd6d800430 /src/nvim/testdir | |
| parent | 19bbc43947a75b0279f9697f5830a238af337c5b (diff) | |
| download | rneovim-d8b4f3e3b83d5a0fd5d844da34da23c88dc9c4c5.tar.gz rneovim-d8b4f3e3b83d5a0fd5d844da34da23c88dc9c4c5.tar.bz2 rneovim-d8b4f3e3b83d5a0fd5d844da34da23c88dc9c4c5.zip | |
vim-patch:8.2.4327: may end up with no current buffer
Problem: May end up with no current buffer.
Solution: When deleting the current buffer to not pick a quickfix buffer as
the new current buffer.
https://github.com/vim/vim/commit/e3537aec2f8d6470010547af28dcbd83d41461b8
The test cannot be ported as-is because Nvim doesn't support "-Z"
command line argument. Just use only "--clean" instead.
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index a00231c5e9..5457223677 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -5505,5 +5505,30 @@ func Test_lopen_bwipe() delfunc R endfunc +" Another sequence of commands that caused all buffers to be wiped out +func Test_lopen_bwipe_all() + let lines =<< trim END + func R() + silent! tab lopen + e foo + silent! lfile + endfunc + cal R() + exe "norm \<C-W>\<C-V>0" + cal R() + bwipe + + call writefile(['done'], 'Xresult') + qall! + END + call writefile(lines, 'Xscript') + if RunVim([], [], '--clean -n -S Xscript') + call assert_equal(['done'], readfile('Xresult')) + endif + + call delete('Xscript') + call delete('Xresult') +endfunc + " vim: shiftwidth=2 sts=2 expandtab |