From 8c0b12d556eedf354892570ab59fa4245e61135f Mon Sep 17 00:00:00 2001 From: gmarik Date: Mon, 29 Nov 2010 16:37:12 -0600 Subject: [PATCH] Use preview-window for search results --- autoload/vundle/scripts.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/autoload/vundle/scripts.vim b/autoload/vundle/scripts.vim index 4a3710a..52bbb88 100644 --- a/autoload/vundle/scripts.vim +++ b/autoload/vundle/scripts.vim @@ -5,12 +5,10 @@ func! vundle#scripts#search(bang,search_str) endf func! s:display(results,search_str) - if !exists('s:buff') - let s:buff = tempname() - split - endif + if !exists('s:buff') | let s:buff = tempname() | endif call writefile(['" Search results for: '.a:search_str] + a:results, s:buff) - exec 'e '.s:buff + pedit `=s:buff` + wincmd P let @/=a:search_str setlocal hls ft=vim redraw