This commit is contained in:
Sebastian Humenda 2021-12-13 15:56:27 -05:00 committed by GitHub
commit c3cc980a4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,9 @@ fun! s:RgSearch(txt)
if &smartcase == 1
let l:rgopts = l:rgopts . '-S '
endif
silent! exe 'grep! ' . l:rgopts . a:txt
" quote a:txt before sending it to the shell
let l:txt = substitute(a:txt, "'", "\\'", "g")
silent! exe 'grep! ' . l:rgopts . "'" . a:txt . "'"
if len(getqflist())
exe g:rg_window_location 'copen'
redraw!