Skip to content

Commit 86b1e5b

Browse files
committed
Fix rg find in files include,exclude path
1 parent 5fc7aef commit 86b1e5b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

autoload/project/find_in_files.vim

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ endfunction
490490
function! s:GetRgCmd(pattern, flags)
491491
let include = s:GetInclude()
492492
" Remove '.', as rg does not support '{./**}'
493-
call filter(include, {_, val -> val != '.'})
493+
call filter(include, {_, val -> !empty(val) && val != '.' && val != './'})
494494

495495
if len(include)
496496
let include_pattern = map(include, {_, val -> val.'/**' })
@@ -683,11 +683,9 @@ function! s:ReplaceEscapedChar(chars, idx, char, from, to)
683683
endfunction
684684

685685
function! s:GetInclude()
686-
let include = copy(project#GetVariable('find_in_files_include'))
687-
return map(include, {_, val -> s:RemoveLeadingDot(val)})
686+
return copy(project#GetVariable('find_in_files_include'))
688687
endfunction
689688

690689
function! s:GetExclude()
691-
let exclude = copy(project#GetVariable('find_in_files_exclude'))
692-
return map(exclude, {_, val -> s:RemoveLeadingDot(val)})
690+
return copy(project#GetVariable('find_in_files_exclude'))
693691
endfunction

0 commit comments

Comments
 (0)