diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-17 09:03:50 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-17 11:02:21 -0400 |
| commit | afd4888c6ae0430cb9e9b26a4b43734b7f39610f (patch) | |
| tree | ca81d5fabf9d9cac7b72fdb10e8e8043fd0de48d /src/nvim/testdir/test_quickfix.vim | |
| parent | a2e1bcd176bbacf4f63727429383436a160c4c58 (diff) | |
| download | rneovim-afd4888c6ae0430cb9e9b26a4b43734b7f39610f.tar.gz rneovim-afd4888c6ae0430cb9e9b26a4b43734b7f39610f.tar.bz2 rneovim-afd4888c6ae0430cb9e9b26a4b43734b7f39610f.zip | |
vim-patch:8.2.1384: no ATTENTION prompt for :vimgrep first match file
Problem: No ATTENTION prompt for :vimgrep first match file.
Solution: When there is an existing swap file do not keep the dummy buffer.
(closes vim/vim#6649)
https://github.com/vim/vim/commit/8ce4b7ed85a7c6499bea5eb1312c85ee7a00e364
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index f9e79919e9..1124032966 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2568,6 +2568,26 @@ func Test_vimgrep_incsearch() set noincsearch endfunc +func Test_vimgrep_existing_swapfile() + call writefile(['match apple with apple'], 'Xapple') + call writefile(['swapfile'], '.Xapple.swp') + let g:foundSwap = 0 + let g:ignoreSwapExists = 1 + augroup grep + au SwapExists * let foundSwap = 1 | let v:swapchoice = 'e' + augroup END + vimgrep apple Xapple + call assert_equal(1, g:foundSwap) + call assert_match('.Xapple.swo', swapname('')) + + call delete('Xapple') + call delete('Xapple.swp') + augroup grep + au! SwapExists + augroup END + unlet g:ignoreSwapExists +endfunc + func XfreeTests(cchar) call s:setup_commands(a:cchar) |