mirror of
https://github.com/jremmen/vim-ripgrep.git
synced 2025-12-28 12:45:32 +08:00
escape vertical bars (|) in the keyword
This commit is contained in:
parent
e803767d12
commit
4fb4c57853
2 changed files with 15 additions and 10 deletions
|
|
@ -21,7 +21,11 @@ if !exists('g:rg_root_types')
|
|||
endif
|
||||
|
||||
fun! s:Rg(txt)
|
||||
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(a:txt))
|
||||
let l:txt = a:txt
|
||||
if exists('g:rg_escape_vbars')
|
||||
let l:txt = escape(l:txt, '|')
|
||||
endif
|
||||
call s:RgGrepContext(function('s:RgSearch'), s:RgSearchTerm(l:txt))
|
||||
endfun
|
||||
|
||||
fun! s:RgSearchTerm(txt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue