Fix extra args to Ag

Fri, 22 Nov 2019 16:02:17 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 22 Nov 2019 16:02:17 -0600
changeset 829
7173f2b81a4e
parent 828
81ede7493890
child 830
3f6654b38b20

Fix extra args to Ag

.vim/autoload/vimrc.vim file | annotate | diff | comparison | revisions
--- a/.vim/autoload/vimrc.vim
+++ b/.vim/autoload/vimrc.vim
@@ -44,7 +44,7 @@ func! vimrc#Ag(args) abort
   let &shellpipe = substitute(&shellpipe, '| tee', ' >', '')
 
   try
-    silent! execute "grep " . escape(a:args, '|')
+    silent! execute "grep " . escape(a:args . join(a:000, ' '), '|')
     copen
 
     let @/ = matchstr(a:args, "\\v(-)\@<!(\<)\@<=\\w+|['\"]\\zs.{-}\\ze['\"]")

mercurial