From 552232da7c1d992af0e0a98fcbfcca94d11af0a9 Mon Sep 17 00:00:00 2001 From: Zhang Kai Date: Tue, 14 Aug 2018 12:01:21 +0800 Subject: [PATCH 1/2] Hide display during search. --- plugin/vim-ripgrep.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim index 3069eb2..d46c57a 100644 --- a/plugin/vim-ripgrep.vim +++ b/plugin/vim-ripgrep.vim @@ -58,8 +58,10 @@ fun! s:RgGrepContext(search, txt) let &grepformat = g:rg_format let l:te = &t_te let l:ti = &t_ti + let l:shellpipe_bak=&shellpipe set t_te= set t_ti= + let &shellpipe="&>" if exists('g:rg_derive_root') call s:RgPathContext(a:search, a:txt) @@ -67,6 +69,7 @@ fun! s:RgGrepContext(search, txt) call a:search(a:txt) endif + let &shellpipe=l:shellpipe_bak let &t_te=l:te let &t_ti=l:ti let &grepprg = l:grepprgb From d112b6127f7fa3ec7aed467f73ab6401fc13ab06 Mon Sep 17 00:00:00 2001 From: Zhang Kai Date: Tue, 14 Aug 2018 12:34:41 +0800 Subject: [PATCH 2/2] Fix redirect shellpipe cause no match on windows platform bug. --- plugin/vim-ripgrep.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/vim-ripgrep.vim b/plugin/vim-ripgrep.vim index d46c57a..332f11d 100644 --- a/plugin/vim-ripgrep.vim +++ b/plugin/vim-ripgrep.vim @@ -61,7 +61,9 @@ fun! s:RgGrepContext(search, txt) let l:shellpipe_bak=&shellpipe set t_te= set t_ti= - let &shellpipe="&>" + if !has("win32") + let &shellpipe="&>" + endif if exists('g:rg_derive_root') call s:RgPathContext(a:search, a:txt)