Bug#482776: vim: creates undeletable buffer when "set hidden" is enabled

James Vega jamessan at debian.org
Wed May 28 23:01:00 UTC 2008


On Sun, May 25, 2008 at 01:33:31AM +0200, Marc Lehmann wrote:
> vim-7.1.293-3 created undeletable buffers when the hidden option is set.
> 
> how to reproduce:
> 
>    echo "set hidden" >$HOME/.vimrc
>    vi somedir/CVS   # it must be a CVS directory
> 
> this creates a netrw buffer:
> 
>    " ============================================================================
>    " Netrw Directory Listing                                        (netrw v119)
>    "   /localvol/root/src/EV/t/CVS
>    "   Sorted by      name
>    "   Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,\.[a-np-z]$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$
>    "   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
>    " ============================================================================
>    ../
>    ./
>    Entries
>    Repository
>    Root
>    ~
>    ~
>    "t/CVS" is a directory                                 8:01 66% + 460 0x2E  46
> 
> when the :bd command is used, the lowest line changes to:
> 
>    "[Scratch]" [RO] 12 lines --66%--                      8:01 66% + 460 0x2E  46           
> 
> :ls shows
> 
>      1 #h   "t/CVS"                        line 1

The buffer you're actually viewing at this point is buffer 3.  The '#'
in "#h" means that is the "alternate buffer".  :ls! will show a '%' on
the line for buffer 3.

> I have not found a way to delete this buffer.

":bd 1" followed by a plain ":bd" will stop the cyclic behavior of
creating new buffers displaying the directory layout.

This behavior is indeed wrong and I'll forward it upstream.  Just wanted
to give a quick explanation of the mystery behavior. :)

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080528/4e765e4c/attachment.pgp 


More information about the pkg-vim-maintainers mailing list