All,
Vim Tip #1078 ("Best way to close (delete) buffer without closing its
window") is pretty useful. In the version shown on the tip page[1], it
doesn't keep your cursor in the window you are trying to preserve. I
think the following line is supposed to serve that purpose:
execute "normal " . g:kwbdWinNum . ""
The final pair of double-quotes are likely not supposed to be empty.
If you replace the line above with the following line, the active window
will be preserved:
execute g:kwbdWinNum "wincmd w"
I would have posted a comment on the tip, but comments are currently
disabled due to spam considerations.
As a side note, is there hope for re-enabling the comment feature? I've
found that many of the scripts have valuable comments, sometimes
containing bug fixes, sometimes pointing to similar or complementary
scripts, etc.
Thanks,
Michael Henry
[1]: http://www.vim.org/tips/tip.php?tip_id=1078