Skip to content

Commit 502337a

Browse files
committed
Fix error with recursionuserpattern_ag
1 parent 21436e0 commit 502337a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

plugin/EasyGrep.vim

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,11 @@ function! s:AddAdditionalLocationsToFileTargetList(fileTargetList)
420420
return fileTargetList
421421
endif
422422

423-
if g:EasyGrepSearchCurrentBufferDir && s:IsBufferDirSearchAllowed()
423+
if g:EasyGrepSearchCurrentBufferDir && s:IsBufferDirSearchAllowed() && !s:CommandHasLen("opt_str_mapinclusionsexpression")
424424
let fileTargetList = s:ApplySearchDirectoriesToFileTargetList(fileTargetList)
425425
endif
426426

427-
if g:EasyGrepHidden
427+
if g:EasyGrepHidden && !s:CommandHasLen("opt_str_hiddenswitch")
428428
let i = 0
429429
let size = len(fileTargetList)
430430
while i < size
@@ -2424,6 +2424,7 @@ function! s:ConfigureGrepCommandParameters()
24242424
\ 'opt_bool_isselffiltering': '0',
24252425
\ 'opt_bool_nofiletargets': '0',
24262426
\ 'opt_str_mapinclusionsexpression': '"--file-search-regex=\"" .substitute(v:val, "^\\*\\.", "\\\\.", "")."\""',
2427+
\ 'opt_str_hiddenswitch': '--hidden ',
24272428
\ })
24282429

24292430
call s:RegisterGrepProgram("pt", {
@@ -2572,6 +2573,10 @@ function! s:GetGrepCommandLine(pattern, add, wholeword, count, escapeArgs, filte
25722573
endif
25732574
endif
25742575

2576+
if g:EasyGrepHidden && s:CommandHasLen("opt_str_hiddenswitch")
2577+
let opts .= commandParams["opt_str_hiddenswitch"]." "
2578+
endif
2579+
25752580
" Suppress errors
25762581
if s:CommandHasLen("opt_str_suppresserrormessages")
25772582
let opts .= commandParams["opt_str_suppresserrormessages"]." "

0 commit comments

Comments
 (0)