Reverse search results to show most recent on top

This commit is contained in:
gmarik 2011-02-11 14:37:09 -06:00
parent f002815be0
commit 840cd3b683

View File

@ -1,7 +1,7 @@
func! vundle#scripts#search(bang,search_str) func! vundle#scripts#search(bang,search_str)
let matches = filter(s:load_scripts(a:bang), 'v:val =~? "'.escape(a:search_str,'"').'"') let matches = filter(s:load_scripts(a:bang), 'v:val =~? "'.escape(a:search_str,'"').'"')
let results = map(matches, ' printf("Bundle \"%s\"", v:val) ') let results = map(matches, ' printf("Bundle \"%s\"", v:val) ')
call s:display(results, a:search_str) call s:display(reverse(results), a:search_str)
endf endf
func! s:display(results,search_str) func! s:display(results,search_str)