This commit is contained in:
Leonardo 2023-04-04 16:42:47 -03:00 committed by GitHub
commit 5205a3bf40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,8 @@ fun! s:RgSearch(txt)
if &smartcase == 1
let l:rgopts = l:rgopts . '-S '
endif
silent! exe 'grep! ' . l:rgopts . a:txt
" Escaping Command-line special characters '#', '%' (:h :_%), and '|' (:h :bar)
silent! exe 'grep! ' . l:rgopts . escape(a:txt, "#%|")
if len(getqflist())
exe g:rg_window_location 'copen'
redraw!