tomtom/tlib_vim — pull request #16 by bruno- (2013-10-05 19:59:23+00:00)
Title: Fix scratch list

Hi,
I'm using [vim-snipmate](https://github.com/garbas/vim-snipmate) that in turn 'leans' on this library. Specifically `tlib#input#List` function is used (and maybe others).

Anyway - I noticed tlib scratch buffer does not behave nicely.
After it is used:
- alternate buffer is changed. C-^ does not work as it should, it jumps back to scratch buffer
- scratch buffer is not completely deleted. That can be seen with `:ls!` command after the buffer is used (even without 'going back' with C-^

This pull request addresses the above with:
- `setlocal bufhidden=wipe` - properly deletes buffer after it's used
- `keepalt` command preserves alternate file
- `keepj` does not mess jump list (C-o, C-i)

I learned about these from [netrw plugin error message buffer](https://github.com/vim-scripts/netrw.vim/blob/master/autoload/netrw.vim#L7837) which is very similar to scratch buffer.

Let me know what you think about the updates?