rking / ag.vim

Vim plugin for the_silver_searcher, 'ag', a replacement for the Perl module / CLI script 'ack'
1.74k stars 131 forks source link

Do not show the split window if there are no matches. #107

Closed lifepillar closed 9 years ago

lifepillar commented 9 years ago

It makes no sense to show an empty list when there are no matches. This pull request addresses this issue by having the split window automatically close when no matches are found. It also makes the "no matches" message more prominent by highlighting it.

Numkil commented 9 years ago

:+1:

losingkeys commented 9 years ago

Thanks for the pull! Trying it quick locally I noticed that the "No matches found" message seems to be cleared by closing the location list/quickfix window. Mind swapping the message/close around?

lifepillar commented 9 years ago

Strange, that doesn't happen to me. Anyway, I swapped those lines.

losingkeys commented 9 years ago

Hmm... I wonder what I was doing wrong in testing this before... Anyway it's working for me now. Thanks again for the pull!