On Thu, 26 Aug 2010, perrytrinier wrote:

Thanks for your reply, Christian. I tried :set hidden, but it behaved the same way.

Did you make sure to explicitly load each buffer before running your example code, but after you had turned 'hidden' on?

Using the Perl interface, I see the same behavior you do, until I do ":set hidden" /and then/ manually cycle all of my buffers into a window. My code:

 :perl foreach my $b (VIM::Buffers()) {VIM::Msg($b->Name() . ' ' . $b->Get(1))}

Your sample code also works fine for me, after I've made sure Vim has actually loaded the buffers, even if only one is currently displayed.

If it's only possible to access loaded buffers, there is no mention of that in the docs at http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim

I do agree this is a somewhat obscure bit of knowledge.  The if_perl
documentation doesn't mention it either.

About the only place I personally know of that gives the right hint is ":help windows-intro" where it explains what an inactive buffer is.

- Christian

--
  "A bore is a man who deprives you of solitude without providing you with
                     company."  -- Gian Vincenzo Gravina
Christian J. Robinson <[email protected]>      http://christianrobinson.name/

--
You received this message from the "vim_dev" 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

Raspunde prin e-mail lui