@@ -260,7 +260,8 @@ function! s:IsRecursiveSearch()
260
260
if g: EasyGrepRecursive
261
261
return ! s: IsModeBuffers ()
262
262
endif
263
- return s: IsCommandAck ()
263
+ let commandParams = s: GetGrepCommandParameters ()
264
+ return has_key (commandParams, " isinherentlyrecursive" ) && (commandParams[" isinherentlyrecursive" ] == 1 )
264
265
endfunction
265
266
" }}}
266
267
" GetSavedName {{{
@@ -2399,6 +2400,7 @@ function! s:GetGrepCommandParameters()
2399
2400
\ ' backslashdir' : ' 0' ,
2400
2401
\ ' errorsuppress' : ' ' ,
2401
2402
\ ' directoryneedsbackslash' : ' 0' ,
2403
+ \ ' isinherentlyrecursive' : ' 0' ,
2402
2404
\ }
2403
2405
elseif s: IsCommandGrep ()
2404
2406
return {
@@ -2416,6 +2418,7 @@ function! s:GetGrepCommandParameters()
2416
2418
\ ' backslashdir' : ' 0' ,
2417
2419
\ ' errorsuppress' : ' -s' ,
2418
2420
\ ' directoryneedsbackslash' : ' 0' ,
2421
+ \ ' isinherentlyrecursive' : ' 0' ,
2419
2422
\ }
2420
2423
elseif s: IsCommandGitGrep ()
2421
2424
return {
@@ -2433,6 +2436,7 @@ function! s:GetGrepCommandParameters()
2433
2436
\ ' backslashdir' : ' 0' ,
2434
2437
\ ' errorsuppress' : ' ' ,
2435
2438
\ ' directoryneedsbackslash' : ' 0' ,
2439
+ \ ' isinherentlyrecursive' : ' 0' ,
2436
2440
\ }
2437
2441
elseif s: IsCommandAck ()
2438
2442
return {
@@ -2450,6 +2454,7 @@ function! s:GetGrepCommandParameters()
2450
2454
\ ' backslashdir' : ' 0' ,
2451
2455
\ ' errorsuppress' : ' ' ,
2452
2456
\ ' directoryneedsbackslash' : ' 0' ,
2457
+ \ ' isinherentlyrecursive' : ' 1' ,
2453
2458
\ }
2454
2459
elseif s: IsCommandPt ()
2455
2460
return {
@@ -2467,6 +2472,7 @@ function! s:GetGrepCommandParameters()
2467
2472
\ ' backslashdir' : ' 0' ,
2468
2473
\ ' errorsuppress' : ' ' ,
2469
2474
\ ' directoryneedsbackslash' : ' 0' ,
2475
+ \ ' isinherentlyrecursive' : ' 0' ,
2470
2476
\ }
2471
2477
elseif s: IsCommandFindstr ()
2472
2478
return {
@@ -2484,6 +2490,7 @@ function! s:GetGrepCommandParameters()
2484
2490
\ ' backslashdir' : ' 1' ,
2485
2491
\ ' errorsuppress' : ' ' ,
2486
2492
\ ' directoryneedsbackslash' : ' 1' ,
2493
+ \ ' isinherentlyrecursive' : ' 0' ,
2487
2494
\ }
2488
2495
endif
2489
2496
return {}
0 commit comments