1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 10:40:04 +08:00

Display filename with match

This commit is contained in:
wsdjeg 2018-01-21 23:48:21 +08:00
parent fa9214cd49
commit 0c8dfce05f

View File

@ -109,9 +109,9 @@ function! s:get_search_cmd(exe, expr) abort
return ['grep', '-inHR', '--exclude-dir', '.git', a:expr, '.']
elseif a:exe ==# 'rg'
if !empty(s:grep_files) && type(s:grep_files) == 3
return ['rg', '-n', '-i', a:expr] + s:grep_files
return ['rg', '-H', '-n', '-i', a:expr] + s:grep_files
else
return ['rg', '-n', '-i', a:expr]
return ['rg', '-H', '-n', '-i', a:expr]
endif
else
return [a:exe, a:expr]