Skip to content

Commit ec87af6

Browse files
authored
Merge pull request #28 from watsoncj/master
Allow passing arbitrary arguments and paths to Rg command, thanks @watsoncj
2 parents f7c1549 + 8d27cd2 commit ec87af6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vim-ripgrep.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if !exists('g:rg_window_location')
2525
endif
2626

2727
fun! g:RgVisual() range
28-
call s:RgGrepContext(function('s:RgSearch'), s:RgGetVisualSelection())
28+
call s:RgGrepContext(function('s:RgSearch'), '"' . s:RgGetVisualSelection() . '"')
2929
endfun
3030

3131
fun! s:Rg(txt)
@@ -61,7 +61,7 @@ fun! s:RgSearch(txt)
6161
if &smartcase == 1
6262
let l:rgopts = l:rgopts . '-S '
6363
endif
64-
silent! exe 'grep! ' . l:rgopts . '"' . a:txt . '"'
64+
silent! exe 'grep! ' . l:rgopts . a:txt
6565
if len(getqflist())
6666
exe g:rg_window_location 'copen'
6767
redraw!

0 commit comments

Comments
 (0)