diff options
-rw-r--r-- | src/quickfix.c | 2 | ||||
-rw-r--r-- | src/testdir/test_quickfix.vim | 15 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/quickfix.c b/src/quickfix.c index 99b0169ea5..f8ff7765ed 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -6022,7 +6022,7 @@ vgr_process_args( static int existing_swapfile(buf_T *buf) { - if (buf->b_ml.ml_mfp != NULL) + if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL) { char_u *fname = buf->b_ml.ml_mfp->mf_fname; size_t len = STRLEN(fname); diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim index c35b11c669..8faf69a318 100644 --- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -2833,6 +2833,21 @@ func Test_vimgrep_with_no_last_search_pat() call delete('Xresult') endfunc +" Test vimgrep without swap file +func Test_vimgrep_without_swap_file() + let lines =<< trim [SCRIPT] + vimgrep grep test_c* + call writefile(['done'], 'Xresult') + qall! + [SCRIPT] + call writefile(lines, 'Xscript') + if RunVim([], [], '--clean -n -S Xscript Xscript') + call assert_equal(['done'], readfile('Xresult')) + endif + call delete('Xscript') + call delete('Xresult') +endfunc + func Test_vimgrep_existing_swapfile() call writefile(['match apple with apple'], 'Xapple') call writefile(['swapfile'], '.Xapple.swp') diff --git a/src/version.c b/src/version.c index 022c90acbf..214ee2a8ed 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1557, +/**/ 1556, /**/ 1555, |