Thanks for your input XyZ! Your improvment works for me if I replace bufexists() with buflisted() (I don't care about hidden buffers).
Axel -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php