@@ -493,8 +493,7 @@ function! s:GetRgCmd(pattern, flags)
493493 call filter (include , {_, val - > val != ' .' })
494494
495495 if len (include )
496- let include_pattern = map (include ,
497- \{ _, val - > val.' /**' })
496+ let include_pattern = map (include , {_, val - > val.' /**' })
498497 let include_arg = ' -g "{' .join (include_pattern, ' ,' ).' }"'
499498 else
500499 let include_arg = ' -g "{**}"'
@@ -630,6 +629,10 @@ function! s:GetSearchFlags(search)
630629 return flags
631630endfunction
632631
632+ function ! s: RemoveLeadingDot (val)
633+ return substitute (a: val , ' ^./\?' , ' ' , ' g' )
634+ endfunction
635+
633636function ! s: RemoveSearchFlags (search )
634637 return substitute (a: search , ' \\C\|\\E\|\\\@<!\\$' , ' ' , ' g' )
635638endfunction
@@ -680,9 +683,11 @@ function! s:ReplaceEscapedChar(chars, idx, char, from, to)
680683endfunction
681684
682685function ! s: GetInclude ()
683- return copy (project#GetVariable (' find_in_files_include' ))
686+ let include = copy (project#GetVariable (' find_in_files_include' ))
687+ return map (include , {_, val - > s: RemoveLeadingDot (val)})
684688endfunction
685689
686690function ! s: GetExclude ()
687- return copy (project#GetVariable (' find_in_files_exclude' ))
691+ let exclude = copy (project#GetVariable (' find_in_files_exclude' ))
692+ return map (exclude, {_, val - > s: RemoveLeadingDot (val)})
688693endfunction
0 commit comments