From f2f15aa2b850bc56959e6d40f317b1c1d0a50c99 Mon Sep 17 00:00:00 2001 From: Stefan Magnuson Date: Tue, 19 Nov 2019 10:33:30 +0000 Subject: [PATCH] Allow blank filename list to be submitted to grep program Specifying '*' will cause any local ignore files to be skipped. When all (non-ignored) files should be searched then no files should be specified for the grep program. --- autoload/greplace.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/greplace.vim b/autoload/greplace.vim index fc10600..1a02166 100644 --- a/autoload/greplace.vim +++ b/autoload/greplace.vim @@ -397,7 +397,7 @@ function! greplace#search(type, ...) if a:type == 'grep' if filenames == '' - let filenames = input('Search in files: ', '*', 'file') + let filenames = input('Search in files: ', '', 'file') endif elseif a:type == 'args' " Search in all the filenames in the argument list @@ -424,7 +424,7 @@ function! greplace#search(type, ...) endfor endif - if filenames == '' + if a:type != 'grep' && filenames == '' call s:warn_msg('Error: No valid file names') return endif