On 6 April 2013, tooth pik <[email protected]> wrote:
> On Sat, Apr 06, 2013 at 10:48:37PM +0300, LCD 47 wrote:
> >    Given a buffer number, is it possible to find out (in Vimscript)
> > whether the corresponding buffer is hidden or not?
> 
> you can change to said buffer with the buffer command
> 
>     :buffer <bufno>
[...]

    Switching to the said buffer makes it unhidden, which is less than
useful. :)

On 7 April 2013, Marcin Szamotulski <[email protected]> wrote:
> You can also get the value with
> 
>     let bufhidden =  getbufvar(bufnr, '&bufhidden')
[...]

    This was the first thing I tried, but it doesn't work reliably.  If
&hidden is set and the current window is :quit, the corresponding buffer
becomes hidden, but &bufhidden is undefined.  Both buflisted() and
bufloaded() return true, but there is no bufhidden() function.  So, is
there a way to detect this situation?

    /lcd

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to