rking/ag.vim — pull request #63 by lesguillemets (2014-06-25 05:53:47+00:00)
Title: Prevent search results from leaking into the terminal

Ref. mileszs/ack.vim#18

When vim is running on terminal, `:Ag` command works as expected, but meanwhile, all the search results are printed on the console. This is painful especially when handling large number of hits.

Adding 6 lines to `Ag#ag`, this commit hopefully fixes that by saving the user-set values of `t_ti` and `t_te` and setting both to ` ` temporally, just before `ag` is called, then restoring those afterwards. It works the same way as `Ag#ag` handles `&grepprg` currently.