Dispose of match listing using :bunload! rather than :bwipeout!
Dispose of match listing using :bunload! rather than :bwipeout!

Previously we created a new buffer every time we showed the match
listing and then disposed of it each time with :bwipeout!. This caused
the buffer numbers to steadily grow.

Now, we dispose of the match listing using :bunload!; this frees the
contents of the buffer and closes the window, but the buffer sticks
around and can be re-used next time we show the match listing. In this
way we always have a stable buffer number for the match listing and
repeatedly using Command-T doesn't drive the buffer numbers up any more.

For more info see:

  https://wincent.com/issues/1724

One concern with this change is that it increases our reliance on the
accuracy of the buffer number, and there is a known bug in Vim 7.3 when
built with --enable-largefile; see this ticket for full details:

  https://wincent.com/issues/1617

If you are affected by this bug the solution is to build Vim using
--disable-largefile. Until the issue gets fixed upstream I am thinking
of adding a workaround in Command-T (falling back to buffer name rather
than number for people with a broken Vim).

Signed-off-by: Wincent Colaiuta <c76ac2e9cd86441713c7dfae92c451f3e6d17fdc@wincent.com>

asoltys/command-t,mtimkovich/command-t,tmeusburger/Command-T,besarthoxhaj/command-t,akitaonrails/Command-T,yrro/command-t,lencioni/command-t,simichaels/dotfiles,yrro/command-t,wincent/command-t,akitaonrails/Command-T,vrkansagara/command-t,asoltys/command-t,simichaels/dotfiles,mtimkovich/command-t,vrkansagara/command-t,nkpart/command-t,1234-/command-t,lencioni/command-t,wincent/command-t,asoltys/command-t,akitaonrails/Command-T,tmeusburger/Command-T,tmeusburger/Command-T,1234-/command-t,wincent/command-t,nkpart/command-t,supriyantomaftuh/command-t,besarthoxhaj/command-t,supriyantomaftuh/command-t,nkpart/command-t