To: vim_dev@googlegroups.com Subject: Patch 8.2.3713 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3713 Problem: MS-Windows: No error message if vimgrep pattern is not matching. Solution: Give an error message. (Christian Brabandt, closes #9245, closes #8762) Files: src/quickfix.c, src/testdir/test_quickfix.vim *** ../vim-8.2.3712/src/quickfix.c 2021-11-18 22:08:52.011682687 +0000 --- src/quickfix.c 2021-12-01 10:48:14.510758218 +0000 *************** *** 6122,6130 **** } // Parse the list of arguments, wildcards have already been expanded. ! if (get_arglist_exp(p, &args->fcount, &args->fnames, TRUE) == FAIL) ! return FAIL; ! if (args->fcount == 0) { emsg(_(e_nomatch)); return FAIL; --- 6122,6129 ---- } // Parse the list of arguments, wildcards have already been expanded. ! if ((get_arglist_exp(p, &args->fcount, &args->fnames, TRUE) == FAIL) || ! args->fcount == 0) { emsg(_(e_nomatch)); return FAIL; *** ../vim-8.2.3712/src/testdir/test_quickfix.vim 2021-11-21 11:35:59.460938795 +0000 --- src/testdir/test_quickfix.vim 2021-12-01 10:48:14.510758218 +0000 *************** *** 5621,5624 **** --- 5621,5639 ---- lclose endfunc + fun Test_vimgrep_nomatch() + call XexprTests('c') + call g:Xsetlist([{'lnum':10,'text':'Line1'}]) + copen + if has("win32") + call assert_fails('vimgrep foo *.zzz', 'E479:') + let expected = [{'lnum': 10, 'bufnr': 0, 'end_lnum': 0, 'pattern': '', 'valid': 0, 'vcol': 0, 'nr': 0, 'module': '', 'type': '', 'end_col': 0, 'col': 0, 'text': 'Line1'}] + else + call assert_fails('vimgrep foo *.zzz', 'E480:') + let expected = [] + endif + call assert_equal(expected, getqflist()) + cclose + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.3712/src/version.c 2021-12-01 10:30:02.368416797 +0000 --- src/version.c 2021-12-01 10:52:46.446375864 +0000 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 3713, /**/ -- "The future's already arrived - it's just not evenly distributed yet." -- William Gibson /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///